<template>
	<view :style="colorStyle">
		<view class='order-submission'>

			<view v-if="productType !== 'buyMaterials' && !virtual_type" class="allAddress" :style="store_self_mention && is_shipping ? '':'padding-top:10rpx'"
				>
				<view class="tab_box flex_sb">
					<view class="tab_item flex_c" :class="{active:tabCurrent==index}" v-for="(item,index) in tabList"
						:key="index" @click="addressType(index,item.id)">
						{{item.label}}
					</view>
				</view>
				<!-- <view class="nav acea-row" style="height: 85rpx;">
					<view class="item font-num" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)"
						v-if='store_self_mention && is_shipping'></view>
					<view class="item font-num" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)"
						v-if='store_self_mention && is_shipping'></view>
				</view> -->
				<!-- <view class="add-title acea-row row-between-wrapper" v-if="!store_self_mention || !is_shipping"
					@click.prevent="openList">
					<view class="acea-row row-middle">
						<view class="icon" :class="shippingType==1?'orange':'red'">
							{{shippingType==0?'商城配送':'门店自提'}}
						</view>
						<view class="text add-text line1" v-if="shippingType==0">{{$t(`由平台为您提供配送服务`)}}</view>
						<view class="text add-text line1" v-if="shippingType==1">{{$t(`线上下单，到店自提`)}}</view>
					</view>

					<view class="text">{{shippingType == 0 ? $t('切换地址') : $t('切换门店')}} <text
							class='iconfont icon-jiantou'></text></view>
				</view> -->
				<!-- 快递/送货 -->
				<view class='address acea-row row-between-wrapper' @tap='onAddress'
					v-if='shippingType == 0||shippingType == 2'>
					<view class="address_box flex_sb" v-if="addressInfo.real_name || ''">
						<view class='addressCon'>
							<view class='name'>{{addressInfo.real_name || ''}}
								<text class='phone'>{{addressInfo.phone || ''}}</text>
							</view>
							<view class="line1">
								<text class='default font-num'
									v-if="addressInfo.is_default">[{{$t(`默认`)}}]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}
							</view>
							<!-- <view class='setaddress'>设置收货地址</view> -->
						</view>
						<view class="right_icon flex_s">
							<text v-if="tabCurrent==2&!isDelivery">不在范围</text>
							<view class='iconfont icon-xiangyou'></view>
						</view>
					</view>

					<view class='addressCon' v-else>
						<view class='setaddress'>{{$t(`设置收货地址`)}}</view>
					</view>
				</view>
				<!-- 自提 -->
				<view class="address self_take flex_sb" v-if="tabCurrent==1" @tap="showStoreList">
					<view class='addressCon flex_s' style="max-width:unset" v-if="storeList.length>0">
						<view class="left_img">
							<image :src="system_store.image" mode="aspectFill"></image>
						</view>
						<view class="right_info">
							<view class='name flex_s'>
								<text>{{system_store.name || ''}}</text>
								<view class='address_icon flex_s'>
									<view class='iconfont icon-dizhi1'></view>
									<text>距您{{system_store.range}}km</text>
								</view>
							</view>
							<view class="line1">
								{{system_store.address}}{{", " + system_store.detailed_address}}
							</view>
						</view>
					</view>
					<block v-else>
						<view style="padding-left: 28rpx;">{{$t(`暂无门店信息`)}}</view>
					</block>
					<view class="right_icon flex_s">
						<view class='iconfont icon-xiangyou'></view>
					</view>
				</view>
				<view class='line'>
					<image src='/static/images/line.jpg'></image>
				</view>
				<!-- 足料换金条 -->
				<!-- <view class='change_box flex_s'>
					<view class="chang_gif">
						<image src="https://yhf.yjgold.cn/imgs/change_icon.gif" mode="aspectFill"></image>
					</view>
					<view class="" style="flex-grow: 1;">
						<view class="change_top flex_sb">
							<view class="left flex_s">
								<text>足料换金条</text>
								<view class="warning_icon"
									@click="$util.goPage('/pages/new_page/agreement/index?type=4')">
									<image src="@/static/imgs/warning.png" mode="aspectFill"></image>
								</view>
							</view>
							<view class="right">
								<view class="swich_box" :style="{opacity: isByMaterials ? 0.3 : 1}" @click="switchChange2">
									<view :class="['on_off',{switch_open:swichChange}]">
										<view :class="['open_icon',{icon_open:swichChange}]"></view>
									</view>
								</view>
							</view>
						</view>
						<view class="change_btm">
							用足料换金条，支付工费即可
						</view>
					</view>

				</view> -->

				<!-- 选择上门时间 -->
				<view class='moneyList' v-if="tabCurrent==2">
					<view class='item acea-row row-between-wrapper' @click="openTimePop">
						<view>{{$t(`上门时间`)}}：</view>
						<view class='money flex_s'>
							<text>{{dateDesc?dateDesc:'请选择上门时间'}}</text>
							<view class="iconfont icon-xiangyou"></view>
						</view>
					</view>
				</view>
			</view>
			
			<orderGoods :priceData="priceData" :news="news" pageType="confirm" :authenticate_type="userInfo.authenticate_type"
				:cartInfo="cartInfo" :is_confirm='true' :shipping_type="shippingType" @changeCart="changeCart">
			</orderGoods>
			
			<block v-if="productType !== 'buyMaterials'">
				
			
			<!-- 足料换金条明细 -->
			<view class='wrapper' v-if="swichChange">
				<view class='item'>
					<view class="title_class">{{$t(`足料换金条明细`)}}</view>
					<view class="title_class sub_title">使用足料换金条，微信支付可免手续费<text
							class="redCalss">￥{{laborData.handling_fee||0}}</text>元</view>
					<view class="change_info">
						<view class="info_item flex_sb" v-if="laborData.gold_weight">
							<view class="text_info">
								黄金足料：<text class="redCalss">{{laborData.gold_weight}}克</text>
							</view>
							<view class="text_info">
								工费：<text class="redCalss">￥{{laborData.gold_labor}}</text>
							</view>
						</view>
						<view class="info_item flex_sb" v-if="laborData.silver_weight">
							<view class="text_info">
								白银足料：<text class="redCalss">{{laborData.silver_weight}}克</text>
							</view>
							<view class="text_info">
								工费：<text class="redCalss">￥{{laborData.silver_labor}}</text>
							</view>
						</view>
						<view class="info_item flex_sb" v-if="laborData.platinum_weight">
							<view class="text_info">
								铂金足料：<text class="redCalss">{{laborData.platinum_weight}}克</text>
							</view>
							<view class="text_info">
								工费：<text class="redCalss">￥{{laborData.platinum_labor}}</text>
							</view>
						</view>
					</view>
					<view class="info_footer flex_sb">
						<view class="left_label">
							工费总额
						</view>
						<view class="right_price flex_s">
							<text class="redCalss" style="margin-right: 13rpx;">￥{{laborData.order_total_labor}}</text>
							<view class="list_detail flex_s" @click="openLaborPop">
								<text>明细</text>
								<text class="iconfont icon-xiangxia"></text>
							</view>
						</view>
					</view>
				</view>
			</view>
			
			<!-- 购买普通商品，可选 金料抵扣 -->
			<!-- <view class='moneyList' v-if="productType !== 'buyMaterials' && !swichChange">
				<view class='item acea-row row-between-wrapper'>
					<view>{{$t(`金料抵扣`)}} <text class="redCalss fs_13">（{{ goldDedutionDetail.gold_stock || 0 }}g）</text></view>
					<view class='acea-row row-between-wrapper' style="color: #000;">
						<block v-if="!goldDedutionDetail.status">
							<text class="redCalss fs_13">{{ goldDedutionDetail.msg }}</text>
							<text class="by-materials-btn" @click="handleByMaterials">去买料</text>
						</block>
						<checkbox-group @change="changeByMaterials">
							<view class="icon_box">
								<checkbox :checked="isByMaterials" :disabled="!goldDedutionDetail.status" style="transform: scale(1.3);" />
							</view>
						</checkbox-group>
					</view>
				</view>
			</view> -->
			
			<view class='wrapper' v-if="confirm.length">
				<view class='item acea-row row-between-wrapper' v-for="(item,index) in confirm" :key="index">
					<view>
						<span v-if="item.status" style="color: red;">*</span>
						<span v-else style="marginLeft: 8px;"></span>
						{{ item.title }}
					</view>
					<!-- text -->
					<view v-if="item.label=='text'" class="confirm">
						<input type="text" :placeholder="$t(`请填写${item.title}`)" v-model="item.value" />
					</view>
					<!-- number -->
					<view v-if="item.label=='number'" class="confirm">
						<input type="number" :placeholder="$t(`请填写${item.title}`)" v-model="item.value" />
					</view>
					<!-- email -->
					<view v-if="item.label=='email'" class="confirm">
						<input type="text" :placeholder="$t(`请填写${item.title}`)" v-model="item.value" />
					</view>
					<!-- data -->
					<view v-if="item.label=='data'" class="uni-list">
						<view class="uni-list-cell">
							<view class="uni-list-cell-db">
								<picker mode="date" :value="item.value" @change="bindDateChange($event,index)">
									<view v-if="item.value == ''" class="fontC">{{date+item.title}}<text
											class='iconfont icon-jiantou'></text></view>
									<view v-else class="uni-input">{{item.value}}</view>
								</picker>
							</view>
						</view>
					</view>
					<!-- time -->
					<view v-if="item.label=='time'">
						<view>
							<view>
								<picker mode="time" :value="item.value" start="00:00" end="23:59"
									@change="bindTimeChange($event,index)">
									<view v-if="item.value == ''" class="fontC">{{time+item.title}}<text
											class='iconfont icon-jiantou'></text></view>
									<view>{{item.value}}</view>
								</picker>
							</view>
						</view>
					</view>
					<!-- id -->
					<view v-if="item.label=='id'" class="confirm">
						<input type="idcard" :placeholder="$t(`请填写`)+item.title" v-model="item.value" />
					</view>
					<!-- phone -->
					<view v-if="item.label=='phone'" class="confirm">
						<input type="tel" :placeholder="$t(`请填写`)+item.title" v-model="item.value" />
					</view>
					<!-- img -->
					<view v-if="item.label=='img'" class="confirmImg">
						<view class='list acea-row row-middle'>
							<view class='pictrue' v-for="(items,indexs) in item.value" :key="indexs">
								<image :src='items' class="img"></image>
								<text class='iconfont icon-guanbi1 font-num del' @click='DelPic(index,indexs)'></text>
							</view>
							<view class='pictrue acea-row row-center-wrapper row-column bor'
								@click='uploadpic(index,item)' v-if="item.value.length < 8">
								<text class='iconfont icon-icon25201'></text>
								<view>{{$t(`上传图片`)}}</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class='moneyList'>
				<view class='item acea-row row-between-wrapper'>
					<view>{{$t(`订单总价`)}}</view>
					<view class='money' style="color: #000;">
						{{$t(`￥`)}}{{allPrice || 0}}
					</view>
				</view>

				<!-- <view class='item acea-row row-between-wrapper'
					v-if="priceGroup.storePostage > 0 || priceGroup.storePostageDiscount > 0">
					<view>{{$t(`配送运费`)}}：</view>
					<view class='money'>
						{{$t(`￥`)}}{{(parseFloat(priceGroup.storePostage)+parseFloat(priceGroup.storePostageDiscount)).toFixed(2)}}
					</view>
				</view>
				<view class='item acea-row row-between-wrapper'
					v-if="priceGroup.levelPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId && !discountId">
					<view>{{$t(`用户等级优惠`)}}：</view>
					<view class='money'>-{{$t(`￥`)}}{{parseFloat(priceGroup.levelPrice).toFixed(2)}}</view>
				</view>
				<view class='item acea-row row-between-wrapper'
					v-if="priceGroup.memberPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId && !discountId">
					<view>{{$t(`付费会员优惠`)}}：</view>
					<view class='money'>-{{$t(`￥`)}}{{parseFloat(priceGroup.memberPrice).toFixed(2)}}</view>
				</view>
				<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
					<view>{{$t(`会员运费优惠`)}}：</view>
					<view class='money'>-{{$t(`￥`)}}{{parseFloat(priceGroup.storePostageDiscount).toFixed(2)}}</view>
				</view>
				<view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
					<view>{{$t(`优惠券抵扣`)}}：</view>
					<view class='money'>-{{$t(`￥`)}}{{parseFloat(coupon_price).toFixed(2)}}</view>
				</view>
				<view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
					<view>{{$t(`积分抵扣`)}}：</view>
					<view class='money'>-{{$t(`￥`)}}{{parseFloat(integral_price).toFixed(2)}}</view>
				</view> -->

			</view>
			<!-- <view class='moneyList'>
				<view class='item'>
					<view class="acea-row row-between-wrapper">
						<view>{{$t(`证书`)}}</view>
						<view class='money flex_s'>
							<text style="color: #D43030;margin-right: 10rpx;"
								v-if="swichValue3">+{{cerPrice||0}}</text>
								<view class="switch_box2">
									<checkbox-group @change="switchChange3">
										<label>
											<checkbox value="cb" :checked="swichValue3" color="#E63523" style="transform:scale(1.3)" />
										</label>
									</checkbox-group>
								</view>
						</view>
					</view>
					<view class="book_box" v-if="swichValue3" @click="$util.previewImageFun(['https://yhf.yjgold.cn/imgs/book_card.png'])">
						<image src="https://yhf.yjgold.cn/imgs/book_card.png" mode="aspectFill"></image>
					</view>
				</view>
			</view> -->
			<view class='moneyList' v-if='shippingType == 0'>
				<view class='item'>
					<view class="acea-row row-between-wrapper">
						<view>{{insure_percent_title||'快递保险费'}}</view>
						<view class='money flex_s'>
							<text style="color: #D43030;margin-right: 10rpx;"
								v-if="swichValue">+{{insurePrice||0}}</text>
							<view class="switch_box2">
								<checkbox-group @change="switchChange">
									<label>
										<checkbox value="cb" :checked="swichValue" color="#E63523" style="transform:scale(1.3)" />
									</label>
								</checkbox-group>
							</view>
							<!-- <mySwitch :value='swichValue' @switchChange="switchChange"></mySwitch> -->
						</view>
					</view>
					<view class="insure_text" v-if="insure_percent_introduce">
						{{insure_percent_introduce}}
					</view>
				</view>
			</view>
			<view class='moneyList'>
				<view class='item acea-row row-between-wrapper'>
					<view>{{$t(`支付类型`)}}</view>
					<view class='pay_type flex_s'>
						<view class="type_item flex_s" :class="{'active':payTypeIndex==item.id}"
							v-for="(item,index) in payTypeList" :key="index" @click="changePayTypeHandle(item)">
							<view class="check_box flex_c" :class="{'check_active':payTypeIndex==item.id}">
								<view class="in_circle" v-if="payTypeIndex==item.id"></view>
							</view>
							<text>{{item.label}}</text>
						</view>
					</view>
				</view>
			</view>
			<view class='moneyList' v-if="shippingType!=1">
				<view class='item acea-row row-between-wrapper'>
					<view>{{$t(`运费`)}}</view>
					<view class='money'>
						到付
					</view>
				</view>
			</view>
			<view class='moneyList' v-if="swichChange&&shippingType==0">
				<view class='item acea-row row-between-wrapper'>
					<view>{{$t(`寄件单号`)}}</view>
					<view class='money flex_s'>
						<view class=""><input type="text" v-model="trade_in_express" placeholder="请输入单号" /> </view>
						<text class="iconfont icon-saoma" @click="scanCodeHandle"></text>
					</view>
				</view>
			</view>
			<view class='wrapper'>
				<!-- <view class='item acea-row row-between-wrapper' @tap='couponTap'
					v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">
					<view>{{$t(`优惠券`)}}</view>
					<view class='discount'>
						{{couponTitle}}
						<text class='iconfont icon-jiantou'></text>
					</view>
				</view> -->
				<!-- <view class='item acea-row row-between-wrapper'
					v-if="!pinkId && !BargainId && !combinationId && !seckillId && !advanceId && integral_open">
					<view>{{$t(`积分抵扣`)}}</view>
					<view class='discount acea-row row-middle'>
						<view> {{useIntegral ? $t(`剩余积分`):$t(`当前积分`)}}
							<text class='num font-color'>{{integral || 0}}</text>
						</view>
						<checkbox-group @change="ChangeIntegral">
							<checkbox :disabled="integral<=0 && !useIntegral" :checked='useIntegral ? true : false' />
						</checkbox-group>
					</view>
				</view> -->
				<!-- <view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
					<view>{{$t(`开具发票`)}}</view>
					<view class='discount'>
						{{invTitle}}
						<text class='iconfont icon-jiantou'></text>
					</view>
				</view> -->
				<!-- <view v-if="shippingType == 1">
					<view class="item acea-row row-between-wrapper">
						<view>{{$t(`用户姓名`)}}</view>
						<view class="discount">
							<input style="text-align: right;" v-model="contacts" type="text" :placeholder="$t(`请输入姓名`)"
								placeholder-class="placeholder"></input>
						</view>
					</view>
					<view class="item acea-row row-between-wrapper">
						<view>{{$t(`联系电话`)}}</view>
						<view class="discount">
							<input style="text-align: right;" v-model="contactsTel" type="text"
								:placeholder="$t(`请输入手机号`)" placeholder-class="placeholder"></input>
						</view>
					</view>
				</view> -->
				<view class='item' v-if="textareaStatus">
					<view>{{$t(`备注说明`)}}</view>
					<view class="mark" v-if="!coupon.coupon && !inputTrip" @click="inputTripClick">
						<view :class="{'mark-msg': mark}" v-text="mark || $t(`填写备注信息，100字以内`)"></view>
					</view>
					<textarea placeholder-class='placeholder' :placeholder="$t(`填写备注信息，100字以内`)"
						v-if="!coupon.coupon && inputTrip" @input='bindHideKeyboard' :focus="focus"
						@blur="inputTrip = false" :value="mark" :maxlength="150" name="mark">
						</textarea>
				</view>
			</view>
			<view class="tip_box" v-if="payTypeIndex==1&&order_warning">
				<text>{{order_warning}}</text>
			</view>
			
			</block>
			<view style='height:120rpx;'></view>
			<view class='footer'>
				<view class="agree_box flex_c">
					<checkbox-group @change="changeCheck">
						<view class="icon_box">
							<checkbox :checked="isAgreen" />
						</view>
					</checkbox-group>

					<view class="text_info">
						阅读并同意<text class="redCalss"
							@click="$util.goPage('/pages/new_page/agreement/index?type=2')">《销售协议》</text>
					</view>
				</view>
				<view class="top_box flex_c">
					<view class="" v-if="payTypeIndex==0">
						{{$t(`合计`)}}:<text class='font-color'>{{$t(`￥`)}}{{ parseFloat(priceGroup.totalPriceAddInsure).toFixed(2)|| 0}}</text>
					</view>
					<view class="" v-else>
						{{$t(`合计`)}}:<text class='font-color'>{{$t(`￥`)}}{{ parseFloat(priceGroup.depositPrice).toFixed(2) || 0}}</text>
					</view>
					<view class="thin_detail" @click="openDetailedPop">
						明细
						<text class='iconfont icon-xiangxia'></text>
					</view>
				</view>
				<!-- 快递/自提 -->
				<view class="btn_box flex_c" v-if="tabCurrent==0||tabCurrent==1">

					<!-- <view class="btn right_btn flex_fc" @click="goPayHandle(2)">
						<view class="text1">余额支付</view>
						<view class="text2">当前余额：{{now_money}}</view>
					</view> -->
					<view class="btn left_btn flex_fc" @click="goPayHandle(1)">
						<view class="text1">微信支付</view>
						<view class="text2" v-if="!swichChange">需加手续费{{handling_percent}}%</view>
					</view>
				</view>
				<!-- 送货 -->
				<view class="btn_box flex_c" v-if="tabCurrent==2">

					<!-- <view class="btn right_btn bg-color-hui flex_fc" v-if="!isDelivery">
						<view class="text1">余额支付</view>
						<view class="text2">当前余额：{{now_money}}</view>
					</view>
					<view class="btn right_btn flex_fc" v-else @click="goPayHandle(2)">
						<view class="text1">余额支付</view>
						<view class="text2">当前余额：{{now_money}}</view>
					</view> -->
					<view class="btn left_btn bg-color-hui flex_fc" v-if="!isDelivery">
						<view class="text1">微信支付</view>
						<view class="text2" v-if="!swichChange">需加手续费{{handling_percent}}%</view>
					</view>
					<view class="btn left_btn flex_fc" @click="goPayHandle(1)" v-else>
						<view class="text1">微信支付</view>
						<view class="text2" v-if="!swichChange">需加手续费{{handling_percent}}%</view>
					</view>
				</view>
				<!-- <view class='settlement' style='z-index:100' @tap.stop="SubOrder"
					v-if="(valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id)">{{$t(`提交订单`)}}
				</view>
				<view class='settlement bg-color-hui' style='z-index:100' v-else>{{$t(`提交订单`)}}</view> -->
			</view>
		</view>
		
		<!-- 金料抵扣  快速购买金料 -->
		<productWindow ref="productWindow" :authenticate_type="userInfo.authenticate_type" @paySuccess="get_gold_deduction"></productWindow>
		
		<view class="alipaysubmit" v-html="formContent"></view>
		<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
			@ChangCoupons="ChangCoupons"></couponListWindow>
		<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :news='news' :address='address'
			:pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"
			@onHaveAddressList="onHaveAddressList"></addressWindow>
		<!-- #ifdef MP -->
		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
		<!-- #endif -->
		<!-- <home v-show="!invShow"></home> -->
		<invoice-picker :inv-show="invShow" :inv-list="invList" :inv-checked="invChecked" :is-special="special_invoice"
			:url-query="urlQuery" @inv-close="invClose" @inv-change="invChange" @inv-cancel="invCancel">
		</invoice-picker>
		<canvas canvas-id="canvas" v-if="canvasStatus"
			:style="{width: canvasWidth + 'px', height: canvasHeight + 'px',position: 'absolute',left:'-100000px',top:'-100000px'}"></canvas>
		<!-- 支付二次弹窗 -->
		<uni-popup ref="popup" :mask-click="false" :safe-area="false" type="center">
			<view class="pop_box">
				<view class="icon_box">
					<view class="img_box flex_c">
						<image src="@/static/imgs/new1.png" mode="aspectFill"></image>
					</view>
				</view>
				<view class="title">
					{{popInfo.desc}}
				</view>
				<view class="good_info">
					<view class="info_item" v-if="popInfo.showGoldPrice.gold && !isByMaterials">
						<text class="left">黄金金价：</text>
						<text class="right">￥{{popInfo.showGoldPrice.gold||0}}/g</text>
					</view>
					<view class="info_item" v-if="popInfo.showGoldPrice.platinum">
						<text class="left">铂金金价：</text>
						<text class="right">￥{{popInfo.showGoldPrice.platinum||0}}/g</text>
					</view>
					<view class="info_item" v-if="popInfo.showGoldPrice.sliver">
						<text class="left">白银金价：</text>
						<text class="right">￥{{popInfo.showGoldPrice.sliver||0}}/g</text>
					</view>
					<view class="info_item" v-if="popInfo.showGoldPrice.palladium">
						<text class="left">钯金金价：</text>
						<text class="right">￥{{popInfo.showGoldPrice.palladium||0}}/g</text>
					</view>
					<view class="info_item">
						<text class="left">当前订单总计：</text>
						<text class="right">￥{{popInfo.productTotalPrice||0}}</text>
					</view>
					<view class="info_item" v-if="popInfo.prePayType==1">
						<text class="left">手续费</text>
						<text class="right">￥{{popInfo.handingPrice||0}}</text>
					</view>
					<view class="info_item" v-if="payTypeIndex==1&&popInfo.depositPrecent">
						<text class="left">定金</text>
						<text class="right">{{popInfo.depositPrecent}}</text>
					</view>
					<view class="info_item">
						<text class="left">需支付</text>
						<text class="right">￥{{popInfo.currentPayPrice||0}}</text>
					</view>
				</view>
				<view class="pop_footer">
					<view class="pop_btn flex_sb">
						<view class="btn gray_btn" @click="closePop">
							考虑一下
						</view>
						<view class="btn theme_btn" @click="payOrder">
							<text v-if="pre_pay_type==1">微信支付</text>
							<text v-if="pre_pay_type==2">余额支付</text>
						</view>
					</view>
					<view class="pop_tip">
						请在{{countDown||0}}秒内支付，否则订单自动取消，支付成功款项将原路退回
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 总明细弹窗 -->
		<uni-popup ref="popup2" :mask-click="false" :safe-area="false" type="bottom" border-radius="8px 8px 0 0">
			<view class="detailed_box" @touchmove.stop="">
				<view class="close_icon flex_c" @click="closeDetailedPop">
					<text class='iconfont icon-guanbi'></text>
				</view>
				<view class="title">
					共{{total_cart_num||0}}件商品
				</view>
				<view class="detail_info">
					<view class="info_item">
						<text class="left">商品总价</text>
						<text class="right">￥{{priceGroup.totalPrice}}</text>
					</view>
					<view class="info_item">
						<text class="left">总克重</text>
						<text class="right">{{priceGroup.totalWeight}}</text>
					</view>
					<view class="info_item" v-if="Number(priceGroup.totalLaborCharges)">
						<text class="left">总工费</text>
						<text class="right">{{priceGroup.totalLaborCharges}}</text>
					</view>
					<view class="info_item" v-if="swichValue">
						<text class="left">保险</text>
						<text class="right">{{priceGroup.insurePrice}}</text>
					</view>
					<view class="info_item" v-if="swichValue3">
						<text class="left">证书</text>
						<text class="right">{{priceGroup.cerPrice}}</text>
					</view>
				</view>
				<view class="detail_info" v-if="isByMaterials">
					<view class="info_item">
						<view class="title_class">{{$t(`抵扣明细`)}}</view>
					</view>
					<view class="info_item">
						<text class="left">黄金抵扣</text>
						<text class="right">{{priceGroup.gold_need_weight}}克</text>
					</view>
				</view>
				<view class="detail_info" v-if="Object.keys(laborData).length&&swichChange">
					<view class="info_item">
						<view class="title_class">{{$t(`足料换金条明细`)}}</view>
					</view>
					<view class="info_item" v-if="laborData.gold_weight">
						<view class="text_info">
							黄金足料：<text class="redCalss">{{laborData.gold_weight}}克</text>
						</view>
						<view class="text_info">
							工费：<text class="redCalss">￥{{laborData.gold_labor}}</text>
						</view>
					</view>
					<view class="info_item" v-if="laborData.silver_weight">
						<view class="text_info">
							白银足料：<text class="redCalss">{{laborData.silver_weight}}克</text>
						</view>
						<view class="text_info">
							工费：<text class="redCalss">￥{{laborData.silver_labor}}</text>
						</view>
					</view>
					<view class="info_item" v-if="laborData.platinum_weight">
						<view class="text_info">
							铂金足料：<text class="redCalss">{{laborData.platinum_weight}}克</text>
						</view>
						<view class="text_info">
							工费：<text class="redCalss">￥{{laborData.platinum_labor}}</text>
						</view>
					</view>
					<view class="info_item" v-if="laborData.palladium_weight">
						<view class="text_info">
							钯金足料：<text class="redCalss">{{laborData.palladium_weight}}克</text>
						</view>
						<view class="text_info">
							工费：<text class="redCalss">￥{{laborData.platinum_labor}}</text>
						</view>
					</view>
					<view class="info_item">
						<view class="left">
							工费总额
						</view>
						<view class="right">
							<text class="redCalss">￥{{laborData.order_total_labor}}</text>
						</view>
					</view>
				</view>
				<view class="price_box">
					实收<text class="num">{{parseFloat(priceGroup.totalPriceAddInsure).toFixed(2)||0}}</text>
				</view>
				<view class="konw_btn" @click="closeDetailedPop">
					我知道了
				</view>
			</view>
		</uni-popup>
		<!-- 送货时间选择弹窗 -->
		<uni-popup ref="popup3" :safe-area="false" type="bottom" border-radius="8px 8px 0 0">
			<view class="time_box" @touchmove.stop="">
				<view class="title flex_s">
					选择上门时间
				</view>
				<view class="body flex_ss">
					<view class="date_box">
						<scroll-view scroll-y="true" style="height: 100%;">
							<view class="tab_item" :class="{active:tabCurrentDate==index}"
								v-for="(item,index) in tabListDate" :key="index" @click="changeTabDate(index)">
								{{item.desc}}{{item.week}}
							</view>
						</scroll-view>

					</view>
					<view class="time_list" v-if="tabListTime.length">
						<scroll-view scroll-y="true" style="height: 100%;">
							<view class="time_item" :class="{active:tabCurrentTime===index}"
								:style="{opacity:tabList[tabCurrent].jieri?0.4:1}" v-for="(item,index) in tabListTime"
								:key="index" @click="changeTabTime(index)">
								{{`${item.start}-${item.end}`}}
							</view>
						</scroll-view>

					</view>
					<view class="time_list" v-else>
						<text>暂无时间段</text>
					</view>
				</view>
				<view class="btn" @click="chooseTime">
					确认时间
				</view>
			</view>
		</uni-popup>

		<!-- 工费明细弹窗 -->
		<uni-popup ref="popup4" :safe-area="false" type="bottom" border-radius="8px 8px 0 0">
			<view class="labor_box" @touchmove.stop="">
				<view class="close_icon flex_c" @click="closeLaborPop">
					<text class='iconfont icon-guanbi'></text>
				</view>
				<!-- 黄金换列表 -->
				<template v-if="goldLaborList.length">
					<block v-for="(item,index) in goldLaborList" :key="index">
						<view class="item_box">
							<view class="title" v-if="index==0">{{item.name}}</view>
							<view class="sub_title">{{item.store_name}}</view>
							<view class="info_box flex_sb">
								<view class="text_info_box"><text class="redCalss">{{item.weight}}</text>克×<text
										class="redCalss">{{item.cart_num}}</text>件</view>
								<view class="text_info_box">工费<text class="redCalss">￥{{item.labor}}/克</text></view>
								<view class="text_info_box">工费总价：<text class="redCalss">￥{{item.all_labor}}</text>
								</view>
							</view>
						</view>
					</block>
				</template>
				<view class="line"></view>
				<!-- 白银换列表 -->
				<template v-if="silverLaborList.length">
					<block v-for="(item,index) in silverLaborList" :key="index">
						<view class="item_box">
							<view class="title" v-if="index==0">{{item.name}}</view>
							<view class="sub_title">{{item.store_name}}</view>
							<view class="info_box flex_sb">
								<view class="text_info_box"><text class="redCalss">{{item.weight}}</text>克×<text
										class="redCalss">{{item.cart_num}}</text>件</view>
								<view class="text_info_box">工费<text class="redCalss">￥{{item.labor}}/克</text></view>
								<view class="text_info_box">工费总价：<text class="redCalss">￥{{item.all_labor}}</text>
								</view>
							</view>
						</view>

					</block>
				</template>
				<view class="line"></view>
				<!-- 铂金换列表 -->
				<template v-if="platinumLaborList.length">
					<block v-for="(item,index) in platinumLaborList" :key="index">
						<view class="item_box">
							<view class="title" v-if="index==0">{{item.name}}</view>
							<view class="sub_title">{{item.store_name}}</view>
							<view class="info_box flex_sb">
								<view class="text_info_box"><text class="redCalss">{{item.weight}}</text>克×<text
										class="redCalss">{{item.cart_num}}</text>件</view>
								<view class="text_info_box">工费<text class="redCalss">￥{{item.labor}}/克</text></view>
								<view class="text_info_box">工费总价：<text class="redCalss">￥{{item.all_labor}}</text>
								</view>
							</view>
						</view>
					</block>
				</template>
				<view class="line"></view>

				<view class="ready_box">
					<view class="ready_title">你需要准备：</view>
					<view class="ready_item flex_sb" v-if="laborData.gold_weight">
						<text>黄金足料</text>
						<text class="redCalss">{{laborData.gold_weight}}克</text>
					</view>
					<view class="ready_item flex_sb" v-if="laborData.platinum_weight">
						<text>铂金足料</text>
						<text class="redCalss">{{laborData.platinum_weight}}克</text>
					</view>
					<view class="ready_item flex_sb" v-if="laborData.silver_weight">
						<text>白银足料</text>
						<text class="redCalss">{{laborData.silver_weight}}克</text>
					</view>
					<view class="ready_item flex_sb" v-if="laborData.palladium_weight">
						<text>钯金足料</text>
						<text class="redCalss">{{laborData.palladium_weight}}克</text>
					</view>
				</view>
				<view class="line"></view>
				<view class="labor_price flex_sb">
					<text>总工费</text>
					<text class="redCalss">￥{{laborData.order_total_labor}}</text>
				</view>
				<view class="konw_btn" style="width: 690rpx;" @click="closeLaborPop">
					我知道了
				</view>
			</view>
		</uni-popup>
		<!-- 足料换金条弹窗 -->
		<uni-popup ref="popup5" :mask-click="false" :safe-area="false" type="bottom" border-radius="8px 8px 0 0">
			<view class="change_pop order-submission" style="padding-bottom: 50rpx;" @touchmove.stop="">
				<view class="close_icon flex_c" @click="closeChangePop">
					<text class='iconfont icon-guanbi'></text>
				</view>
				<view class="pop_title">
					足料换金条
				</view>
				<view class="pop_sub_title">
					使用足料换金条，微信支付可免手续费<text class="redCalss">￥{{laborData.handling_fee||0}}</text>元
				</view>
				<view class="good_list" :style="temCartInfo.length>2?'height: 560rpx':'height: auto'">
					<scroll-view scroll-y="true" style="height: 100%;">
						<orderGoodsChange ref="orderGoodsChange" :news="news" pageType="confirm" :cartInfo="temCartInfo"
							:is_confirm='true' :shipping_type="shippingType" @changeCart="changeCart"
							@ChangeGoldHandle="ChangeGoldHandle" @setAllSelectValue="setAllSelectValue">
						</orderGoodsChange>
					</scroll-view>
				</view>
				<view class='wrapper' v-if="Object.keys(laborData).length">
					<view class='item'>
						<view class="title_class">{{$t(`足料换金条明细`)}}</view>
						<view class="change_info">
							<view class="info_item flex_sb" v-if="laborData.gold_weight">
								<view class="text_info">
									黄金足料：<text class="redCalss">{{laborData.gold_weight}}克</text>
								</view>
								<view class="text_info">
									工费：<text class="redCalss">￥{{laborData.gold_labor}}</text>
								</view>
							</view>
							<view class="info_item flex_sb" v-if="laborData.silver_weight">
								<view class="text_info">
									白银足料：<text class="redCalss">{{laborData.silver_weight}}克</text>
								</view>
								<view class="text_info">
									工费：<text class="redCalss">￥{{laborData.silver_labor}}</text>
								</view>
							</view>
							<view class="info_item flex_sb" v-if="laborData.platinum_weight">
								<view class="text_info">
									铂金足料：<text class="redCalss">{{laborData.platinum_weight}}克</text>
								</view>
								<view class="text_info">
									工费：<text class="redCalss">￥{{laborData.platinum_labor}}</text>
								</view>
							</view>
							<view class="info_item flex_sb" v-if="laborData.palladium_weight">
								<view class="text_info">
									钯金足料：<text class="redCalss">{{laborData.palladium_weight}}克</text>
								</view>
								<view class="text_info">
									工费：<text class="redCalss">￥{{laborData.palladium_labor}}</text>
								</view>
							</view>
						</view>
						<view class="info_footer flex_sb">
							<view class="left_label">
								工费总额
							</view>
							<view class="right_price flex_s">
								<text class="redCalss"
									style="margin-right: 13rpx;">￥{{laborData.order_total_labor}}</text>
							</view>
						</view>
					</view>
				</view>
				<view class="konw_btn" style="width: 690rpx;" @click="makeChangeHandle">
					确认兑换
				</view>
			</view>
		</uni-popup>
		<!-- 轻提示 -->
		<!-- <ljs-toast :time='3000' :show.sync="ljs_toast">因换料订单免手续费，需全部商品都选择换料才能正常支付（金料不参与换料）</ljs-toast> -->
		<modal ref="modal" :content="modalContent" confirmText="去充值" @confirm="goPage"></modal>
		<modal ref="modal2" :showCancel="false" :content="modal2Content" @confirm="konwHandle"></modal>
		<modal ref="modal3" content="使用此功能需要做认证,是否前往认证?" confirmText="去认证" @confirm="modalConfirm"></modal>
		<modal ref="modal4" content="足金换料订单不能与板料和一口价商品一起结算，请返回购物车分开结算" :showCancel="false" confirmText="确认返回"
			@confirm="goBack"></modal>
		<view class="toast_box" v-if="toastShow">
			<view class="box">
				<text class="text">加载中</text>
			</view>
		</view>
		<!-- <view class="masker_tip" v-if="showMasker">
			<view class="img_box" @click="showMasker=false">
				<image src="../static/masker_icon.png" mode="aspectFill"></image>
			</view>
		</view> -->
	
	</view>
</template>
<script>
	import modal from "@/components/modal/modal.vue";
	import {
		orderConfirm,
		getCouponsOrderPrice,
		orderCreate,
		postOrderComputed,
		checkShipping,
		create_order_price,
		deliveryNew,
		area,
		orderPay,
		get_price_data,
		get_gold_deduction
	} from '@/api/order.js';
	import {
		trade_in_list,
		trade_in_confirm,
		trade_in_labor,
		trade_in_detail
	} from '@/api/new_api.js';
	import {
		getAddressDefault,
		getAddressDetail,
		invoiceList,
		invoiceOrder,
		getAddressList,
		get_gold_price_by_metaltype
	} from '@/api/user.js';
	import {
		openPaySubscribe
	} from '@/utils/SubscribeMessage.js';
	import {
		storeListApi
	} from '@/api/store.js';
	import {
		CACHE_LONGITUDE,
		CACHE_LATITUDE,
		USER_INFO
	} from '@/config/cache.js';
	import couponListWindow from '@/components/couponListWindow';
	import addressWindow from '@/components/addressWindow';
	import orderGoods from '@/components/orderGoods/index.vue';
	import orderGoodsChange from '@/components/orderGoods/change.vue';
	import productWindow from '@/components/productWindowOne';
	import home from '@/components/home';
	import invoicePicker from '../components/invoicePicker/index.vue';
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapGetters
	} from "vuex";
	// #ifdef MP
	import authorize from '@/components/Authorize';
	// #endif
	import payment from '@/components/payment';
	import colors from "@/mixins/color";
	import mySwitch from '@/components/switch/index'
	import {
		debounceImmediate
	} from "@/utils/validate";
	export default {
		components: {
			payment,
			invoicePicker,
			couponListWindow,
			addressWindow,
			orderGoods,
			orderGoodsChange,
			home,
			mySwitch,
			modal,
			productWindow,
			// #ifdef MP
			authorize
			// #endif
		},
		mixins: [colors],
		computed: {},
		data() {
			const currentDate = this.getDate({
				format: true
			})
			return {
				// showMasker: false,
				toastShow: false,
				ljs_toast: false,
				confirm: '', //自定义留言
				date: this.$t(`请选择`),
				time: this.$t(`请选择`),

				canvasWidth: "",
				canvasHeight: "",
				canvasStatus: false,
				newImg: [],
				
				goldDedutionDetail: {},
				productType: '',

				textareaStatus: true,
				//支付方式
				cartArr: [{
						"name": this.$t(`微信支付`),
						"icon": "icon-weixin2",
						value: 'weixin',
						title: this.$t(`使用微信快捷支付`),
						payStatus: 1,
					},
					{
						"name": this.$t(`支付宝支付`),
						"icon": "icon-zhifubao",
						value: 'alipay',
						title: this.$t(`使用支付宝支付`),
						payStatus: 1,
					},
					{
						"name": this.$t(`余额支付`),
						"icon": "icon-yuezhifu",
						value: 'yue',
						title: this.$t(`可用余额`),
						payStatus: 1,
					},
					{
						"name": this.$t(`线下支付`),
						"icon": "icon-yuezhifu1",
						value: 'offline',
						title: this.$t(`使用线下付款`),
						payStatus: 2,
					}, {
						"name": this.$t(`好友代付`),
						"icon": "icon-haoyoudaizhifu",
						value: 'friend',
						title: this.$t(`找微信好友支付`),
						payStatus: 1,
					}

				],
				virtual_type: 0,
				allPrice: 0,
				formContent: '',
				payType: '', //1微信支付；2余额支付
				openType: 1, //优惠券打开方式 1=使用
				active: 0, //支付方式切换
				coupon: {
					coupon: false,
					list: [],
					statusTile: this.$t(`立即使用`)
				}, //优惠券组件
				address: {
					address: false
				}, //地址组件
				addressInfo: {}, //地址信息
				pinkId: 0, //拼团id
				addressId: 0, //地址id
				couponId: 0, //优惠券id
				cartId: '', //购物车id
				newCartId: '',
				BargainId: 0,
				combinationId: 0,
				seckillId: 0,
				discountId: 0,
				userInfo: {}, //用户信息
				mark: '', //备注信息
				couponTitle: this.$t(`请选择`), //优惠券
				coupon_price: 0, //优惠券抵扣金额
				useIntegral: false, //是否使用积分
				integral_price: 0, //积分抵扣金额
				integral: 0,
				usable_integral: 0,
				ChangePrice: 0, //使用积分抵扣变动后的金额
				formIds: [], //收集formid
				status: 0,
				is_address: false,
				toPay: false, //修复进入支付时页面隐藏从新刷新页面
				shippingType: 0,
				system_store: {},
				storePostage: 0,
				advanceId: 0,
				contacts: '',
				contactsTel: '',
				mydata: {},
				storeList: [],
				store_self_mention: 0,
				cartInfo: [],
				temCartInfo: [],
				priceGroup: {},
				animated: false,
				totalPrice: 0,
				integralRatio: "0",
				pagesUrl: "",
				orderKey: "",
				// usableCoupon: {},
				offlinePostage: "",
				isAuto: false, //没有授权的不会自动授权
				isShowAuth: false, //是否隐藏授权
				from: '',
				news: 1,

				// invTitle: '不开发票',
				invTitle: this.$t(`不开发票`),
				special_invoice: false,
				invoice_func: false,
				header_type: '',
				invShow: false,
				invList: [],
				invChecked: '',
				urlQuery: '',
				pay_close: false,
				noCoupon: 0,
				valid_count: 0,
				discount_id: 0,
				is_shipping: true,
				inputTrip: false,
				focus: true,
				integral_open: false,
				jumpData: {},
				tabCurrent: 0,
				tabList: [{
					label: '快递',
					id: 'express'
				}, {
					label: '自提',
					id: 'take'
				}, {
					label: '送货',
					id: 'delivery'
				}],
				payTypeIndex: 0, //0:全款支付 1：定金支付
				payTypeList: [{
					label: '全款支付',
					id: 0
				}, {
					label: '定金支付',
					id: 1
				}],
				swichValue: false,//保险开关
				swichValue3: false,//证书开关
				tabCurrentDate: 0,
				tabListDate: [],
				tabCurrentTime: 0,
				tabListTime: [],
				get_type: 'express', //收货方式（express快递;delivery送货;自提take;）
				popInfo: {},
				dateDesc: '',
				checkTime: '',
				modal2Content: '',
				modalContent:'余额不足，可前往充值，使用余额会更优惠哦',
				isDelivery: 0, //是否在配送范围，0不在，1在
				now_money: 0, //用户余额
				handling_percent: 0, //微信支付手续费
				insurePrice: 0, //保险
				cerPrice: 0, //证书
				total_cart_num: 0, //共多少件商品
				confirmTimer: null,
				pre_pay_type: 1, //1：微信支付，2：余额支付
				order_warning: '', //定金支付红色提醒文本
				insure_percent_title:'',//保险标题
				insure_percent_introduce: '', //保险底部说明文本
				swichChange: false,
				isAgreen: false,
				isByMaterials: false,
				trade_in_express: '', //订单号
				laborData: {}, //工费明细
				laborList: [], //确认换料的商品列表
				goldLaborList: [], //确认换料的黄金列表
				silverLaborList: [], //确认换料的白银列表
				platinumLaborList: [], //确认换料的铂金列表
				deposit_pay: 1,
				imgSrc: this.$imgSrc,
				timer1:null,//实时合计金额
				timer2:null,//实时合计金额
				timer3:null,//实时合计金额
				popParams:{},//弹窗实时金价
				countDown:10,
				priceData:{
					gold:{},
					platinum:{},
					sliver:{},
				},//实时金价
			};
		},
		computed: mapGetters(['isLogin']),
		watch: {
			// startDate() {
			// 	return this.getDate('start');
			// },
			// endDate() {
			// 	return this.getDate('end');
			// }
			countDown: function(newVal, oldVal) {
				if (newVal < 1) {
					this.closePop()
					clearInterval(this.timer2)
				}
			},
			swichChange(nVal, oVal) {
				if (nVal) {
					this.payTypeList = [{
						label: '全款支付',
						id: 0
					}]
				} else {
					if (this.deposit_pay) {
						this.payTypeList = [{
							label: '全款支付',
							id: 0
						}, {
							label: '定金支付',
							id: 1
						}]
					}

				}
			}
		},
		onUnload(){
			this.clearTimer()
		},
		onHide() {
			this.clearTimer()
		},
		onLoad(options) {
			// const firsrIn = uni.getStorageSync('firsrIn')
			// if (!firsrIn) {
			// 	this.showMasker = true
			// 	uni.setStorageSync('firsrIn', true)
			// }
			this.productType = options.productType
			
			// 是否同意勾选过协议
			// const isAgreenBool=uni.getStorageSync('isAgreenBool')
			// if(isAgreenBool){
			// 	this.isAgreen=true
			// }
			// #ifdef H5
			this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
			// #endif
			// #ifdef MP
			this.from = 'routine'
			// #endif
			// #ifdef APP-PLUS
			this.from = 'app'
			// #endif
			if (!options.cartId) return this.$util.Tips({
				title: this.$t(`请选择要购买的商品`)
			}, {
				tab: 3,
				url: 1
			});
			this.couponId = options.couponId || 0;
			this.noCoupon = Number(options.noCoupon) || 0;
			this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
			this.addressId = options.addressId || 0;
			this.cartId = options.cartId;
			this.newCartId = options.cartId
			this.is_address = options.is_address ? true : false;
			this.news = !options.new || options.new === '0' ? 0 : 1;
			this.invChecked = options.invoice_id || '';
			this.header_type = options.header_type || '1';
			this.couponTitle = options.couponTitle || this.$t(`请选择`)
			if (options.invoice_id) {
				let name = ''
				name += options.header_type == 1 ? this.$t(`个人`) : this.$t(`企业`);
				name += options.invoice_type == 1 ? this.$t(`普通`) : this.$t(`专用`);
				name += this.$t(`发票`);
				this.invTitle = name;
			}
			// #ifndef APP-PLUS
			this.textareaStatus = true;
			// #endif
			if (this.isLogin && this.toPay == false) {
				this.checkShipping();
				// this.getaddressInfo();
				// this.getConfirm();
				// this.$nextTick(function() {
				// 	this.$refs.addressWindow.getAddressList();
				// })
			} else {
				toLogin();
			}
		},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			let _this = this

			uni.$on("handClick", res => {
				if (res) {
					_this.system_store = res.address
				}
				// 清除监听
				uni.$off('handClick');
			})

		},
		methods: {
			// 获取实时金价
			get_gold_price_by_metaltype(){
				let uid=uni.getStorageSync('UID')
				const params={
					uid:uid||0
				}
				// get_gold_price_by_metaltype(params).then((res)=>{
				// 	this.priceData=res.data
				// })
				// return
				if(this.timer3) clearInterval(this.timer3)
				this.timer3=setInterval(()=>{
					get_gold_price_by_metaltype(params).then((res)=>{
						this.priceData=res.data
					})
				},1000)
				
			},
			clearTimer(){
				if(this.timer1) clearInterval(this.timer1)
				if(this.timer2) clearInterval(this.timer2)
				if(this.timer3) clearInterval(this.timer3)
			},
			setAllSelectValue(val) {
				if (val == 1) {
					// 全选
					this.temCartInfo.forEach((item) => {
						item.is_trade_in = true
					})

				} else {
					// 反选
					this.temCartInfo.forEach((item) => {
						item.is_trade_in = false
					})
				}
				if (!this.getChecKId()) return this.laborData = {} //没有选中商品清空明细数据
				this.trade_in_labor() //计算工费
			},
			modalConfirm() {
				this.$refs.modal3.close()
				uni.navigateTo({
					url: '/pages/new_page/cert/inlet'
				})
			},
			handleByMaterials() {
				this.$refs.productWindow.setStoreInfoFun(22, 'buyMaterials')
			},
			changeByMaterials() {
				this.isByMaterials = !this.isByMaterials
				if(this.isByMaterials) {
					this.swichChange = false
					this.laborData = {}
					
					this.payTypeIndex = 0
					this.payTypeList = [{
						label: '全款支付',
						id: 0
					}]
				}else {
					this.payTypeList = [{
						label: '全款支付',
						id: 0
					}, {
						label: '定金支付',
						id: 1
					}]
				}
			},
			changeCheck() {
				this.isAgreen = !this.isAgreen
				// if(this.isAgreen){
				// 	uni.setStorageSync('isAgreenBool',true)
				// }else{
				// 	uni.removeStorageSync('isAgreenBool')
				// }
			},
			scanCodeHandle() {
				let that = this
				// 允许从相机和相册扫码
				uni.scanCode({
					success: function(res) {
						console.log(res, "识别信息");
						that.trade_in_express = res.result
					},
					fail: function(err) {
						that.$util.Tips({
							title: '识别失败'
						})
					}
				});
			},
			isMix() {
				const mix = this.cartInfo.some((item) => item.is_trade_in) && this.cartInfo.some((item) => !item
					.is_trade_in)
				return mix
			},
			isAllChange() {
				const allChange = this.cartInfo.every((item) => item.is_trade_in)
				return allChange
			},
			trade_in_detail() {
				const params = {
					cart_id: this.getChecKId(),
					new: this.news
				}
				trade_in_detail(params).then((res) => {
					const list = res.data.list
					console.log(list, "换料商品");
					const gold = list.gold
					if (gold && gold.length) {
						this.goldLaborList = gold
					} else {
						this.goldLaborList = []
					}

					const silver = list.silver
					if (silver && silver.length) {
						this.silverLaborList = silver
					} else {
						this.silverLaborList = []
					}
					const platinum = list.platinum
					if (platinum && platinum.length) {
						this.platinumLaborList = platinum
					} else {
						this.platinumLaborList = []
					}
					// this.laborList = data
				})
			},
			trade_in_labor(init) {
				let params = {
					cart_id: '',
					new: this.news
				}
				if (init) {
					// 初始化数据的时候存在换料订单
					params.cart_id = this.cartInfo.filter((item) => item.is_trade_in).map((item) => item.id).join(',')
				} else {
					// 用户自由选择
					params.cart_id = this.getChecKId()
				}
				trade_in_labor(params).then((res) => {
					this.laborData = res.data
				})
			},
			trade_in_list() {
				trade_in_list({
					cart_id: this.newCartId,
					new: this.news
				}).then((res) => {
					this.temCartInfo = res.data
				})
			},
			ChangeGoldHandle(index) {
				this.temCartInfo[index].is_trade_in = !this.temCartInfo[index].is_trade_in
				const checkedArr = this.temCartInfo.filter((item) => item.is_trade_in)
				if (checkedArr.length == this.temCartInfo.length) {

					this.$refs.orderGoodsChange.isAllSelect = true
					console.log("全选", this.$refs.orderGoodsChange.isAllSelect);
				} else {

					this.$refs.orderGoodsChange.isAllSelect = false
					console.log("不全选", this.$refs.orderGoodsChange.isAllSelect);
				}
				if (!this.getChecKId()) return this.laborData = {} //没有选中商品清空明细数据
				this.trade_in_labor() //计算工费
			},
			getChecKId() {
				const cartId = this.temCartInfo.filter((item) => item.is_trade_in).map((item) => item.id).join(',')
				return cartId
			},
			makeChangeHandle() {
				// let haveChange = this.temCartInfo.some((item) => item.is_trade_in)

				this.swichChange = true
				this.isByMaterials = false
				// 确认兑换提交
				let params = {
					cart_id: cartId,
					new: this.news
				}
				let cartId = this.getChecKId()
				if (!cartId) params['for_null'] = 1
				if (this.news) {
					params.cart_id = this.newCartId
				} else {
					params.cart_id = cartId
				}


				trade_in_confirm(params).then(() => {
					this.getConfirm();
				})


				this.closeChangePop()
			},
			// 未设置默认地址时，选择地址列表的第一个
			getAddressListhandle: function() {
				let that = this;
				getAddressList({
					page: 1,
					limit: 5
				}).then(res => {
					const data = res.data

					if (data.length) {
						let firstAddress = data[0];
						that.addressInfo = firstAddress || {};
						that.addressId = firstAddress.id || 0;
						that.address.addressId = firstAddress.id || 0;
						if (that.addressInfo.latitude) {
							this.areaApi()
						}
					}

				})
			},
			changeCart(val) {

				this.getConfirm();
			},

			// 去支付
			payPriceHandle(orderId, paytype) {
				
				let that = this;
				that.clearTimer()//清除计时器
				uni.showLoading({
					title: that.$t(`支付中`)
				});
				// if (paytype == 'friend' && that.orderId) {
				// 	uni.hideLoading();
				// 	return uni.navigateTo({
				// 		url: '/pages/users/payment_on_behalf/index?oid=' + that.oid + '&spread=' +
				// 			this.$store.state.app.uid,
				// 		success: res => {},
				// 		fail: () => {},
				// 		complete: () => {}
				// 	});
				// }
				orderPay({
					uni: orderId,
					paytype: paytype,
					type: 0,
					// #ifdef H5
					quitUrl: location.port ? location.protocol + '//' + location.hostname + ':' + location
						.port +
						'/pages/goods/order_details/index?order_id=' + orderId : location.protocol +
						'//' + location.hostname +
						'/pages/goods/order_details/index?order_id=' + orderId
					// #endif
					// #ifdef APP-PLUS
					quitUrl: '/pages/goods/order_details/index?order_id=' + orderId
					// #endif
				}).then(res => {

					let status = res.data.status,
						orderId = res.data.result.order_id,
						jsConfig = res.data.result.jsConfig,
						goPages = '/pages/goods/order_pay_status/index?order_id=' + this.orderId + '&msg=' +
						res
						.msg +
						'&type=3' + '&totalPrice=' + this.payPriceShow,
						friendPay = '/pages/users/payment_on_behalf/index?order_id=' + this.orderId +
						'&spread=' +
						this
						.$store.state.app.uid
					switch (status) {
						case 'ORDER_EXIST':
						case 'EXTEND_ORDER':
							uni.hideLoading();
							that.clearTimer()//清除计时器
							return that.$util.Tips({
								title: res.msg
							}, {
								tab: 5,
								url: goPages
							});
						case 'ALLINPAY_PAY':
							uni.hideLoading();
							that.clearTimer()//清除计时器
							// #ifdef MP
							this.initIn = true
							wx.openEmbeddedMiniProgram({
								appId: 'wxef277996acc166c3',
								extraData: {
									cusid: jsConfig.cusid,
									appid: jsConfig.appid,
									version: jsConfig.version,
									trxamt: jsConfig.trxamt,
									reqsn: jsConfig.reqsn,
									notify_url: jsConfig.notify_url,
									body: jsConfig.body,
									remark: jsConfig.remark,
									validtime: jsConfig.validtime,
									randomstr: jsConfig.randomstr,
									paytype: jsConfig.paytype,
									sign: jsConfig.sign,
									signtype: jsConfig.signtype
								}
							})
							this.jumpData = {
								orderId: res.data.result.order_id,
								msg: res.msg,
							}
							// #endif
							// #ifdef APP-PLUS
							plus.runtime.openURL(jsConfig.payinfo);
							setTimeout(e => {
								uni.reLaunch({
									url: goPages
								})
							}, 1000)
							// #endif
							// #ifdef H5
							this.formpost(res.data.result.pay_url, jsConfig)
							// #endif
							break;
						case 'PAY_ERROR':
							uni.hideLoading();
							that.clearTimer()//清除计时器
							return that.$util.Tips({
								title: res.msg
							}, {
								tab: 5,
								url: goPages
							});
							break;
						case 'SUCCESS':
							uni.hideLoading();
							that.clearTimer()//清除计时器
							if (paytype !== 'friend') {
								return that.$util.Tips({
									title: res.msg,
									icon: 'success'
								}, {
									tab: 4,
									url: '/pages/goods/order_list/index'
								});
							} else {
								return that.$util.Tips({
									title: res.msg,
									icon: 'success'
								}, {
									tab: 4,
									url: friendPay
								});
							}


							break;
						case 'WECHAT_PAY':
							that.clearTimer()//清除计时器
							that.toPay = true;
							// #ifdef MP
							/* that.toPay = true; */
							let mp_pay_name = ''
							if (uni.requestOrderPayment) {
								mp_pay_name = 'requestOrderPayment'
							} else {
								mp_pay_name = 'requestPayment'
							}
							uni[mp_pay_name]({
								timeStamp: jsConfig.timestamp,
								nonceStr: jsConfig.nonceStr,
								package: jsConfig.package,
								signType: jsConfig.signType,
								paySign: jsConfig.paySign,
								success: function(res) {
									that.clearTimer()//清除计时器
									uni.hideLoading();
									
									if (that.BargainId || that.combinationId || that.pinkId ||
										that.seckillId || that.discountId)
										return that.$util.Tips({
											title: that.$t(`支付成功`),
											icon: 'success'
										}, {
											tab: 4,
											url: '/pages/goods/order_list/index'
										});
										return that.$util.Tips({
											title: that.$t(`支付成功`),
											icon: 'success'
										}, {
											tab: 5,
											url: '/pages/goods/order_list/index'
										});
									
								},
								fail: function(e) {
									uni.hideLoading();
									return that.$util.Tips({
										title: that.$t(`取消支付`)
									}, {
										tab: 1,
										url: '/pages/index/index'
									});
								},
								complete: function(e) {
									uni.hideLoading();
									//关闭当前页面跳转至订单状态
									if (res.errMsg == 'requestPayment:cancel' || e.errMsg ==
										'requestOrderPayment:cancel') return that.$util
										.Tips({
											title: that.$t(`取消支付`)
										}, {
											tab: 5,
											url: goPages + '&status=2'
										});
								},
							})
							// #endif
							// #ifdef H5
							this.$wechat.pay(res.data.result.jsConfig).then(res => {
								return that.$util.Tips({
									title: that.$t(`支付成功`),
									icon: 'success'
								}, {
									tab: 5,
									url: goPages
								});
							}).catch(res => {
								if (!this.$wechat.isWeixin()) {
									uni.redirectTo({
										url: goPages + '&msg=' + that.$t(`支付失败`) +
											'&status=2'
										// '&msg=支付失败&status=2'
									})
								}
								if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
									title: that.$t(`取消支付`)
								}, {
									tab: 5,
									url: goPages + '&status=2'
								});
							})
							// #endif
							// #ifdef APP-PLUS
							uni.requestPayment({
								provider: 'wxpay',
								orderInfo: jsConfig,
								success: (e) => {
									let url = goPages;
									uni.showToast({
										title: that.$t(`支付成功`)
									})
									setTimeout(res => {
										uni.redirectTo({
											url: url
										})
									}, 2000)
								},
								fail: (e) => {
									let url = '/pages/goods/order_pay_status/index?order_id=' +
										orderId +
										'&msg=' + that.$t(`支付失败`);
									uni.showModal({
										content: that.$t(`支付失败`),
										showCancel: false,
										success: function(res) {
											if (res.confirm) {
												uni.redirectTo({
													url: url
												})
											} else if (res.cancel) {}
										}
									})
								},
								complete: () => {
									uni.hideLoading();
								},
							});
							// #endif
							break;
						case 'PAY_DEFICIENCY':
							uni.hideLoading();
							that.clearTimer()//清除计时器
							//余额不足
							return that.$util.Tips({
								title: res.msg
							}, {
								tab: 5,
								url: goPages + '&status=1'
							});
							break;

						case "WECHAT_H5_PAY":
							uni.hideLoading();
							that.clearTimer()//清除计时器
							that.$util.Tips({
								title: that.$t(`等待支付中`)
							}, {
								tab: 4,
								url: goPages + '&status=0'
							});
							setTimeout(() => {
								location.href = res.data.result.jsConfig.h5_url;
							}, 1500);
							break;

						case 'ALIPAY_PAY':
							that.clearTimer()//清除计时器
							//#ifdef H5
							uni.hideLoading();
							that.$util.Tips({
								title: that.$t(`等待支付中`)
							}, {
								tab: 4,
								url: goPages + '&status=0'
							});
							that.formContent = res.data.result.jsConfig;
							setTimeout(() => {
								document.getElementById('alipaysubmit').submit();
							}, 1500);
							//#endif
							// #ifdef MP
							uni.navigateTo({
								url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
							});
							// #endif
							// #ifdef APP-PLUS
							uni.requestPayment({
								provider: 'alipay',
								orderInfo: jsConfig,
								success: (e) => {
									uni.showToast({
										title: that.$t(`支付成功`)
									})
									let url = '/pages/goods/order_pay_status/index?order_id=' +
										orderId +
										'&msg=' + that.$t(`支付成功`);
									setTimeout(res => {
										uni.redirectTo({
											url: url
										})
									}, 2000)

								},
								fail: (e) => {
									let url = '/pages/goods/order_pay_status/index?order_id=' +
										orderId +
										'&msg=' + that.$t(`支付失败`);
									uni.showModal({
										content: that.$t(`支付失败`),
										showCancel: false,
										success: function(res) {
											if (res.confirm) {
												uni.redirectTo({
													url: url
												})
											} else if (res.cancel) {}
										}
									})
								},
								complete: () => {
									uni.hideLoading();
								},
							});
							// #endif
							break;
					}

				}).catch(err => {
					console.log("报错------------");
					uni.hideLoading();
					that.clearTimer()//清除计时器
					return that.$util.Tips({
						title: err
					}, () => {
						that.$emit('onChangeFun', {
							action: 'pay_fail'
						});
					});
				})
			},
			// 是否在配送范围内
			areaApi() {
				const params = {
					latitude: this.addressInfo.latitude,
					longitude: this.addressInfo.longitude
				}
				area(params).then((res) => {
					this.isDelivery = res.data.res
				})
			},
			deliveryNew(type, date) {
				const params = {
					type: type,
					date: date
				}
				deliveryNew(params).then((res) => {
					const data = res.data
					if (type == 'date') {
						this.tabListDate = data
					} else {
						this.tabListTime = data
					}
				})
			},
			create_order_price(payType) {
				this.pre_pay_type = payType
				// payType:1微信支付；2余额支付
				if(payType==2){
					// 余额支付需要判断是否已认证
					if (this.userInfo.authenticate_type == 0&&!this.userInfo.close_recharge) return this.$refs.modal3.open()
				}
				let arrTem = this.cartInfo.map((item) => {
					const pamItem = {
						'unique': item.product_attr_unique,
						'cart_num': item.cart_num,
						'is_trade_in': item.is_trade_in
					}
					return pamItem
				})
				let params = {}
				if (this.tabListDate.length) {
					// 选择送货情况
					params = {
						product_attr_unique: arrTem, //请求接口（用,号连接）
						is_deposit: this.payTypeIndex, //0:全款支付 1：定金支付
						pre_pay_type: payType, //1：微信支付，2：余额支付
						send_date: this.tabListDate[this.tabCurrentDate].date,
						send_time: this.checkTime,
						need_insure: this.swichValue ? 1 : 0, //0:不需要保险；1:需要保险
						is_cert: this.swichValue3 ? 1 : 0, //0:不需要证书；1:需要证书
						is_trade_in: this.isAllChange() ? 1 : 0,
						exchange: Number(this.isByMaterials)
					}
				} else {
					params = {
						product_attr_unique: arrTem, //请求接口【/api/order/confirm】的所有data.cartInfo.product_attr_unique（用,号连接）
						is_deposit: this.payTypeIndex, //0:全款支付 1：定金支付
						pre_pay_type: payType, //1：微信支付，2：余额支付
						need_insure: this.swichValue ? 1 : 0, //0:不需要保险；1:需要保险
						is_cert: this.swichValue3 ? 1 : 0, //0:不需要证书；1:需要证书
						is_trade_in: this.isAllChange() ? 1 : 0,
						exchange: Number(this.isByMaterials)
					}
				}
				this.popParams=params
				create_order_price(params).then((res) => {
					this.popInfo = res.data
					const keys = Object.keys(this.popInfo.showGoldPrice)
					console.log(keys);
					// 单独购买黄金，选择了金料抵扣
					if(keys.length===1 && keys[0] === 'gold' && this.isByMaterials) {
						this.payOrder()
						return
					}
					this.countDown=this.popInfo.closeWindowTime
					this.openPop() //微信支付信息弹窗
					this.get_pop_price()//支付信息弹窗实时价格
					this.confirmTimer = setInterval(() => {
						this.countDown--
					}, 1000)
				}).catch((err) => {
					console.log(err, "sjdkfjkdj");
					if (err.status == 802 || err.status == 803) {
						this.modal2Content = err.msg
						this.$refs.modal2.open() //弹窗提醒送货上门需满足多少克
					}
					if (err.status == 801) {
						this.modalContent = err.msg
						this.$refs.modal.open() //弹窗提醒送货上门需满足多少克
					}


				})
			},
			// 获取弹窗实时价格
			get_pop_price(){
				// create_order_price(this.popParams).then((res) => {
				// 	this.popInfo = res.data
				// }).catch((err) => {
				// 	console.log(err, "sjdkfjkdj");
				// clearInterval(this.timer2)
				
				// })
				// return
				if(this.timer2) clearInterval(this.timer2)
			this.timer2=setInterval(()=>{
				create_order_price(this.popParams).then((res) => {
					this.popInfo = res.data
				}).catch((err) => {
					console.log(err, "sjdkfjkdj");
				clearInterval(this.timer2)
				
				})
			},1000)
				
			},
			payOrder() {
				this.closePop()
				this.SubOrder()
				return
				// if ((this.valid_count > 0 && !this.discount_id) || (this.valid_count == this.cartInfo.length && this
				// 		.discount_id)) {
				// 	this.SubOrder()
				// }

			},

			goPage() {
				this.$refs.modal.close()
				uni.navigateTo({
					url: '/pages/new_page/user/recharge'
				})
			},
			konwHandle() {
				this.$refs.modal2.close()
			},
			showModal() {
				this.$refs.modal.open()
			},
			chooseTime() {
				this.closeTimePop()
				const date = this.tabListDate[this.tabCurrentDate].date
				this.checkTime = this.tabListTime[this.tabCurrentTime].start + '-' + this.tabListTime[this.tabCurrentTime]
					.end
				this.dateDesc = date + ' ' + this.checkTime
			},
			changeTabDate(index) {
				this.tabCurrentDate = index
				this.deliveryNew('time', this.tabListDate[index].date) //获取送货时间
			},
			changeTabTime(index) {
				this.tabCurrentTime = index
			},
			// 微信支付二次弹窗
			openPop() {
				if(this.timer3) clearInterval(this.timer3)//清除实时金价计时器
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup.open()
			},
			closePop() {
				if(this.confirmTimer) clearInterval(this.confirmTimer)
				if(this.timer2) clearInterval(this.timer2)//清除支付弹窗实时价格
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup.close()
				this.get_gold_price_by_metaltype()//获取实时金价
			},
			// 总明细弹窗
			openDetailedPop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup2.open()
			},
			closeDetailedPop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup2.close()
			},
			// 打开工费明细弹窗
			openLaborPop() {
				this.trade_in_detail() //获取工费明细数据
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup4.open()
			},
			// 关闭工费明细弹窗
			closeLaborPop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup4.close()
			},
			// 打开足料换金条弹窗
			openChangePop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup5.open()
			},
			// 关闭足料换金条弹窗
			closeChangePop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup5.close()
			},

			openTimePop() {
				this.deliveryNew('time', this.tabListDate[this.tabCurrentDate].date)
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup3.open()
			},
			closeTimePop() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup3.close()
			},
			switchChange(val) {
				// this.swichValue = val
				this.swichValue = !this.swichValue
				this.getConfirm()
			},
			switchChange3(val) {
				// this.swichValue3 = val
				this.swichValue3 = !this.swichValue3
				this.getConfirm()
			},
			switchChange2(val) {
				if (this.payTypeIndex == 1) return this.$util.Tips({
					title: '定金支付不支持换料'
				})
				if (!this.temCartInfo.length) return this.$util.Tips({
					title: '商品不支持换料'
				})
				if(this.isByMaterials) return
				// TODO
				// if (this.userInfo.authenticate_type == 0&&!this.userInfo.close_recharge) return this.$refs.modal3.open()
				this.openChangePop()
				// this.getConfirm()
			},
			changePayTypeHandle(item) {
				this.payTypeIndex = item.id
			},
			changeTab(index) {
				this.shippingType = index
				// this.tabCurrent = 
			},
			checkShipping() {
				let that = this;
				checkShipping(that.cartId, that.news).then(res => {
					if (res.data.type == 0) {
						that.is_shipping = true;
						that.shippingType = 0;
						this.getaddressInfo();
						this.getConfirm();
						this.$nextTick(function() {
							this.$refs.addressWindow.getAddressList();
						})
					} else {
						if (res.data.type == 1) {
							that.is_shipping = false;
							that.shippingType = 0;
							this.getaddressInfo();
							this.getConfirm();
							this.$nextTick(function() {
								this.$refs.addressWindow.getAddressList();
							})
						} else if (res.data.type == 2) {
							that.is_shipping = false;
							that.shippingType = 1;
							this.addressType(1)
							this.getConfirm();
							this.getList();
						}
					}
				}).catch(err => {
					uni.showToast({
						title: err,
						icon: 'none'
					});
				});
			},
			// 不开发票
			invCancel() {
				this.invChecked = '';
				this.invTitle = this.$t(`不开发票`)
				this.invShow = false;
			},
			// 选择发票
			invChange(id) {
				let name = '';
				this.invChecked = id;
				this.invShow = false;
				const result = this.invList.find(item => item.id === id);
				name += result.header_type === 1 ? this.$t(`个人`) : this.$t(`企业`);
				name += result.type === 1 ? this.$t(`普通`) : this.$t(`专用`);
				name += this.$t(`发票`);
				this.invTitle = name;
			},
			openList() {
				if (this.shippingType == 0) {
					this.onAddress()
				} else {
					this.showStoreList()
				}
			},
			// 关闭发票
			invClose() {
				this.invShow = false;
				this.getInvoiceList()
			},
			getInvoiceList() {
				uni.showLoading({
					title: this.$t(`正在加载中`)
				})
				invoiceList().then(res => {
					uni.hideLoading();
					this.invList = res.data.map(item => {
						item.id = item.id.toString();
						return item;
					});
					const result = this.invList.find(item => item.id == this.invChecked);
					if (result) {
						let name = '';
						name += result.header_type === 1 ? this.$t(`个人`) : this.$t(`企业`);
						name += result.type === 1 ? this.$t(`普通`) : this.$t(`专用`);
						name += this.$t(`发票`);
						this.invTitle = name;
					}
				}).catch(err => {
					uni.showToast({
						title: err,
						icon: 'none'
					});
				});
			},
			/**
			 * 开发票
			 */
			goInvoice: function() {
				this.getInvoiceList()
				this.invShow = true;
				this.urlQuery =
					`new=${this.news}&cartId=${this.cartId}&pinkId=${this.pinkId}&couponId=${this.couponId}&addressId=${this.addressId}&specialInvoice=${this.special_invoice}&couponTitle=${this.couponTitle}`;
			},
			/**
			 * 授权回调事件
			 * 
			 */
			onLoadFun: function() {
				this.getaddressInfo();
				this.getConfirm();
				//调用子页面方法授权后执行获取地址列表
				// this.$scope.selectComponent('#address-window').getAddressList();
			},
			/**
			 * 事件回调
			 *
			 */
			onChangeFun: function(e) {
				let opt = e;
				let action = opt.action || null;
				let value = opt.value != undefined ? opt.value : null;
				action && this[action] && this[action](value);
			},
			payClose: function() {
				this.pay_close = false;
			},
			goBack() {
				this.$refs.modal4.close()
				uni.navigateBack()
			},
			goPayHandle: debounceImmediate(function(type) {
				this.pre_pay_type = type
				if (!this.isAgreen) return this.$util.Tips({
					title: '阅读并同意《销售协议》'
				})
				if (this.swichChange && type == 1) {
					// 存在换料商品
					// if (this.isMix()) return this.$util.Tips({
					// 	title: '因换料订单免手续费，需全部商品都选择换料才能正常支付（金料不参与换料）',
					// 	endtime:3000
					// })
					if (this.isMix()) return this.$refs.modal4.open()
				}
				if (this.get_type === 'delivery' && !this.dateDesc) return this.$util.Tips({
					title: '请选择上门时间'
				})
				
				if(this.productType !== 'buyMaterials') {
					this.$refs.productWindow.closeAttr()
				}

				if (this.swichChange && !this.isMix()) {
					// 微信支付且是换料订单时直接调起支付，无需展示弹窗明细
					this.SubOrder()
				} else {
					this.create_order_price(type) //获取下单前弹窗的金额值
				}


			}, 1000),
			goPay() {
				this.pay_close = true;
			},
			payCheck(type) {
				this.payType = type;
				this.SubOrder();
			},
			/**
			 * 获取门店列表数据
			 */
			getList: function() {
				let longitude = uni.getStorageSync("user_longitude") || ''; //经度
				let latitude = uni.getStorageSync("user_latitude") || ''; //纬度
				let data = {
					latitude: latitude, //纬度
					longitude: longitude, //经度
					page: 1,
					limit: 10
				}
				storeListApi(data).then(res => {
					let list = res.data || [];
					this.$set(this, 'storeList', list);
					this.$set(this, 'system_store', list[0]);
				}).catch(err => {})
			},
			// 关闭地址弹窗；
			changeClose: function() {
				this.$set(this.address, 'address', false);
			},
			/*
			 * 跳转门店列表
			 */
			showStoreList: function() {

				let _this = this
				if (this.storeList.length > 0) {
					uni.navigateTo({
						url: '/pages/goods/goods_details_store/index'
					})
				}
			},
			changePayType(type) {
				this.payType = type
				this.computedPrice()
			},
			computedPrice: function() {
				let shippingType = this.shippingType;
				postOrderComputed(this.orderKey, {
					addressId: this.addressId,
					useIntegral: this.useIntegral ? 1 : 0,
					couponId: this.couponId,
					shipping_type: parseInt(shippingType) + 1,
					payType: this.payType
				}).then(res => {
					let result = res.data.result;
					if (result) {
						this.totalPrice = result.pay_price;
						this.integral_price = result.deduction_price;
						this.coupon_price = result.coupon_price;
						this.integral = this.useIntegral ? result.SurplusIntegral : this.usable_integral;
						this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
						this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
					}
				})
			},
			addressType(e, type) {
				let index = e;
				let that = this;
				// if (this.shippingType == parseInt(index)) return
				this.shippingType = parseInt(index);
				if (type == this.get_type) return
				// this.shippingType = type;
				this.get_type = type;
				this.tabCurrent = e
				// 送货
				if (index != 2) {
					this.tabListDate = []
					this.tabListTime = []

				}
				if (index != 0) {
					this.swichValue = false
				}

				if (index == 0) {
					//快递
				} else if (index == 1) {
					// 自提
					// #ifdef H5
					if (that.$wechat.isWeixin()) {
						that.$wechat.location().then(res => {
							uni.setStorageSync('user_latitude', res.latitude);
							uni.setStorageSync('user_longitude', res.longitude);
							this.getList()
						}).catch(err => {
							this.getList()
						})
					} else {
						// #endif	
						uni.getLocation({
							type: 'wgs84',
							success: (res) => {
								uni.setStorageSync('user_latitude', res.latitude);
								uni.setStorageSync('user_longitude', res.longitude);
							},
							complete: () => {
								this.getList()
							}
						})
						// #ifdef H5	
					}
					// #endif
				} else if (index == 2) {
					// 送货
					this.deliveryNew('date') //获取送货时间
					if (this.addressInfo.latitude) {
						this.areaApi()
					}

				}
				this.$nextTick(e => {
					this.getConfirm();
					// this.computedPrice();
				})
			},
			bindPickerChange: function(e) {
				let value = e.detail.value;
				this.shippingType = value;
				this.computedPrice();
			},
			ChangCouponsClone: function() {
				this.$set(this.coupon, 'coupon', false);
			},
			changeTextareaStatus: function() {
				for (let i = 0, len = this.coupon.list.length; i < len; i++) {
					this.coupon.list[i].use_title = '';
					this.coupon.list[i].is_use = 0;
				}
				this.textareaStatus = true;
				this.status = 0;
				this.$set(this.coupon, 'list', this.coupon.list);
			},
			/**
			 * 处理点击优惠券后的事件
			 * 
			 */
			ChangCoupons: function(e) {
				// this.usableCoupon = e
				// this.coupon.coupon = false
				let index = e,
					list = this.coupon.list,
					couponTitle = this.$t(`请选择`),
					couponId = 0;
				for (let i = 0, len = list.length; i < len; i++) {
					if (i != index) {
						list[i].use_title = '';
						list[i].is_use = 0;
					}
				}
				if (list[index].is_use) {
					//不使用优惠券
					list[index].use_title = '';
					list[index].is_use = 0;
				} else {
					//使用优惠券
					list[index].use_title = this.$t(`不使用`);
					list[index].is_use = 1;
					couponTitle = list[index].coupon_title;
					couponId = list[index].id;
				}
				this.couponTitle = couponTitle;
				this.couponId = couponId;
				this.$set(this.coupon, 'coupon', false);
				this.$set(this.coupon, 'list', list);
				this.computedPrice();
			},
			/**
			 * 使用积分抵扣
			 */
			ChangeIntegral: function() {
				this.useIntegral = !this.useIntegral;
				this.computedPrice();
			},
			/**
			 * 选择地址后改变事件
			 * @param object e
			 */
			OnChangeAddress: function(e) {
				this.textareaStatus = true;
				this.addressId = e;
				this.address.address = false;
				this.getConfirm()
				this.getaddressInfo();
				this.computedPrice();

			},
			bindHideKeyboard: function(e) {
				this.mark = e.detail.value;
			},
			setCartInfo(data) {
				console.log(data, "购物车信息 ");
				let validList = data;

				let numSub = [{
					numSub: true
				}, {
					numSub: false
				}];
				let numAdd = [{
						numAdd: true
					}, {
						numAdd: false
					}],
					selectValue = [];
				if (validList.length > 0) {
					for (let index in validList) {
						if (validList[index].cart_num == 1) {
							validList[index].numSub = true;
						} else {
							validList[index].numSub = false;
						}
						let productInfo = validList[index].productInfo;
						if (productInfo.hasOwnProperty('attrInfo') && validList[index].cart_num ==
							validList[index].productInfo.attrInfo
							.stock) {
							validList[index].numAdd = true;
						} else if (validList[index].cart_num == validList[index].productInfo
							.stock) {
							validList[index].numAdd = true;
						} else {
							validList[index].numAdd = false;
						}
						if (validList[index].attrStatus) {
							validList[index].checked = true;
							selectValue.push(validList[index].id);
						} else {
							validList[index].checked = false;
						}
					}
				}
				this.cartInfo = validList
				// 获取实时金价
				this.get_gold_price_by_metaltype()
				
				// 存在换料订单按钮打开
				let isChange = this.cartInfo.some((item) => item.is_trade_in)
				if (isChange) {
					this.swichChange = true
					this.trade_in_labor(true)
				} else {
					this.swichChange = false
					this.laborData = {}
				}
			},
			/**
			 * 获取当前订单实时金额
			 * 
			 */
			get_price_data() {
				if(this.timer1) clearInterval(this.timer1)
				// get_price_data(params).then((res) => {
				// 	this.$set(this, 'priceGroup', res.data);
				// 	this.$set(this, 'allPrice', res.data.totalPrice)
				// })
				// return
				this.timer1=setInterval(() => {
					const params = {
						cartId: this.cartId,
						new: this.news,
						addressId: this.addressId,
						shippingType: this.shippingType + 1,
						need_insure: this.swichValue ? 1 : 0,
						is_cert: this.swichValue3 ? 1 : 0, //0:不需要证书；1:需要证书
						exchange: Number(this.isByMaterials)
					}
					get_price_data(params).then((res) => {
						this.$set(this, 'priceGroup', res.data);
						this.$set(this, 'allPrice', res.data.totalPrice)
					})
				}, 1000)

			},
			/**
			 * 获取当前订单详细信息
			 * 
			 */
			getConfirm: function() {
				let that = this;
				// return;
				// uni.showLoading({
				// 	title: that.$t(`正在加载中`),
				// 	mask: true
				// });
				let need_insure = this.swichValue ? 1 : 0
				let is_cert = this.swichValue3 ? 1 : 0//是否需要证书

				orderConfirm(that.cartId, that.news, that.addressId, that.shippingType + 1, need_insure,is_cert).then(res => {
					that.$set(that, 'userInfo', res.data.userInfo);
					that.$set(that, 'confirm', res.data.custom_form || []);
					this.confirm.map(e => {
						if (e.label === 'img') e.value = []
					})
					that.$set(that, 'integral', res.data.usable_integral);
					that.$set(that, 'usable_integral', res.data.usable_integral);
					that.$set(that, 'contacts', res.data.userInfo.real_name);
					that.$set(that, 'contactsTel', res.data.userInfo.record_phone === '0' ? '' : res.data
						.userInfo.record_phone);
					that.setCartInfo(res.data.cartInfo)
					// that.$set(that, 'cartInfo', );

					that.$set(that, 'integralRatio', res.data.integralRatio);
					that.$set(that, 'offlinePostage', res.data.offlinePostage);
					that.$set(that, 'orderKey', res.data.orderKey);
					that.trade_in_list() //获取以旧换新列表
					that.$set(that, 'valid_count', res.data.valid_count);
					that.$set(that, 'discount_id', res.data.discount_id)
					that.$set(that, 'priceGroup', res.data.priceGroup);
					that.get_price_data() //获取实时金额
					that.$set(that, 'order_warning', res.data.order_warning);
					that.$set(that, 'deposit_pay', res.data.deposit_pay);
					if (!res.data.deposit_pay) {
						that.payTypeList.splice(1, 1)
					}
					that.$set(that, 'insure_percent_introduce', res.data.insure_percent_introduce);
					that.$set(that, 'insure_percent_title', res.data.insure_percent_title);
					that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice),
						parseFloat(res.data
							.priceGroup.storePostage)));
					// that.$set(that, 'allPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice),
					// 	parseFloat(res.data
					// 		.priceGroup.vipPrice)).toFixed(2));
					
					that.$set(that, 'handling_percent', res.data.handling_percent)
					that.$set(that, 'now_money', res.data.userInfo.now_money)
					that.$set(that, 'insurePrice', res.data.priceGroup.insurePrice)
					that.$set(that, 'cerPrice', res.data.priceGroup.cerPrice)
					that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
					that.$set(that, 'invoice_func', res.data.invoice_func);
					that.$set(that, 'special_invoice', res.data.special_invoice);
					that.$set(that, 'store_self_mention', res.data.store_self_mention);
					that.$set(that, 'virtual_type', res.data.virtual_type || 0);
					that.$set(that, 'integral_open', res.data.integral_open);
					that.$set(that, 'total_cart_num', res.data.total_cart_num); //共多少件商品
					uni.hideLoading()
					//微信支付是否开启
					that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
					//支付宝是否开启
					that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
					//#ifdef MP
					that.cartArr[1].payStatus = 0;
					//#endif
					//余额支付是否开启
					// that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
					that.cartArr[2].number = res.data.userInfo.now_money;
					that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
					if (res.data.offline_pay_status == 2 || res.data.deduction) {
						that.cartArr[3].payStatus = 0
					} else {
						that.cartArr[3].payStatus = 1
					}
					//好友代付是否开启
					that.cartArr[4].payStatus = res.data.friend_pay_status || 0;
					// that.$set(that, 'cartArr', that.cartArr);
					that.$set(that, 'ChangePrice', that.totalPrice);
					that.getBargainId();
					that.getCouponList();
					if (this.addressId) {
						this.computedPrice();
					}
					// 金料抵扣数据
					that.$nextTick(()=>{
						that.get_gold_deduction()
					})
				}).catch(err => {
					// uni.hideLoading()
					return this.$util.Tips({
						title: err.msg
					});
				});
			},
			
			get_gold_deduction() {
				if(this.cartInfo && this.cartInfo.length) {
					let _ids = []
					this.cartInfo.forEach(item=>{
						_ids.push(item.id)
					})
					get_gold_deduction({cart_id: _ids.join(',')}).then(({data})=>{
						this.goldDedutionDetail = data
						if(data.status == 0) {
							this.isByMaterials = false
						}
					})
				}
			},
			/*
			 * 提取砍价和拼团id
			 */
			getBargainId: function() {
				let that = this;
				let cartINfo = that.cartInfo;
				let BargainId = 0;
				let combinationId = 0;
				let discountId = 0;
				let advanceId = 0;
				cartINfo.forEach(function(value, index, cartINfo) {
					BargainId = cartINfo[index].bargain_id,
						combinationId = cartINfo[index].combination_id,
						discountId = cartINfo[index].discount_id,
						advanceId = cartINfo[index].advance_id
				})
				that.$set(that, 'BargainId', parseInt(BargainId));
				that.$set(that, 'combinationId', parseInt(combinationId));
				that.$set(that, 'discountId', parseInt(discountId));
				that.$set(that, 'advanceId', parseInt(advanceId));
				if (that.cartArr.length == 3 && (BargainId || combinationId || that.seckillId || discountId)) {
					that.cartArr[2].payStatus = 0;
					that.$set(that, 'cartArr', that.cartArr);
				}
			},
			/**
			 * 获取当前金额可用优惠券
			 * 
			 */
			getCouponList: function() {
				let shippingType = this.shippingType;
				let that = this;
				let data = {
					cartId: this.cartId,
					'new': this.news,
					'shippingType': parseInt(shippingType) + 1
				}
				getCouponsOrderPrice(this.totalPrice, data).then(res => {
					that.$set(that.coupon, 'list', res.data);
					that.openType = 1;
				});
			},
			/*
			 * 获取默认收货地址或者获取某条地址信息
			 */
			getaddressInfo: function() {
				let that = this;
				let fnc = that.addressId ? getAddressDetail : getAddressDefault
				fnc(that.addressId).then(res => {
					console.log(!Array.isArray(res.data), "是覅电话覅收到");
					if (!Array.isArray(res.data)) {
						res.data.is_default = parseInt(res.data.is_default);
						that.addressInfo = res.data || {};
						that.addressId = res.data.id || 0;
						that.address.addressId = res.data.id || 0;
						if (that.addressInfo.latitude) {
							this.areaApi()
						}

					} else {
						this.getAddressListhandle()
					}
				})
			},
			onHaveAddressList() {
				this.haveAddressList = true
			},
			payItem: function(e) {
				let that = this;
				let active = e;
				that.active = active;
				that.animated = true;
				that.payType = that.cartArr[active].value;
				that.computedPrice();
				setTimeout(function() {
					that.car();
				}, 500);
			},
			couponTap: function() {
				this.coupon.coupon = true;
				this.coupon.list.forEach((item, index) => {
					if (item.id == this.couponId) {
						item.is_use = 1
					} else {
						item.is_use = 0
					}
				})
				this.$set(this.coupon, 'list', this.coupon.list);
			},
			car: function() {
				let that = this;
				that.animated = false;
			},
			onAddress: function() {
				let that = this;
				if (this.addressInfo.real_name || this.haveAddressList) {
					this.$refs.addressWindow.getAddressList();
					that.textareaStatus = false;
					that.address.address = true;
					that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
						.cartId +
						'&pinkId=' +
						this.pinkId +
						'&couponId=' +
						this.couponId;

				} else {
					uni.navigateTo({
						url: '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
							.pinkId +
							'&couponId=' + this.couponId + '&new=' + this.news
					})
				}
			},
			formpost(url, postData) {
				let tempform = document.createElement("form");
				tempform.action = url;
				tempform.method = "post";
				tempform.target = "_self";
				tempform.style.display = "none";
				for (let x in postData) {
					let opt = document.createElement("input");
					opt.name = x;
					opt.value = postData[x];
					tempform.appendChild(opt);
				}
				document.body.appendChild(tempform);
				this.$nextTick(e => {
					tempform.submit();
				})
			},
			paymentHandle: debounceImmediate(function(data) {
				let that = this;
				orderCreate(that.orderKey, {...data, exchange: Number(this.isByMaterials)}).then(res => {
					const data = res.data.result
					that.payPriceHandle(data.orderId, data.payType)
					// uni.reLaunch({
					// 	url: `/pages/goods/cashier/index?order_id=${res.data.result.orderId}&from_type=order`
					// })
				}).catch(err => {
					if (err.status == 801) {
						this.$refs.modal.open() //弹窗提醒送货上门需满足多少克
					}
					// uni.hideLoading();
					// return that.$util.Tips({
					// 	title: err
					// });
				});
			}, 1000),
			clickTextArea() {
				this.$refs.textarea.focus()
			},
			SubOrder(e) {
				let that = this,
					data = {};
				// 买金料入到库存，所以不用收货地址
				if (!that.addressId && that.shippingType != 1) {
					return that.$util.Tips({
						title: that.$t(`请选择收货地址`)
					});
				}
				
				// if (that.shippingType == 1) {
				// 	if (that.contacts == "" || that.contactsTel == "") {
				// 		return that.$util.Tips({
				// 			title: that.$t(`请填写联系人或联系人电话`)
				// 		});
				// 	}
				// 	if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
				// 		return that.$util.Tips({
				// 			title: that.$t(`请输入正确的手机号码`)
				// 		});
				// 	}
				// 	if (!that.contacts) {
				// 		return that.$util.Tips({
				// 			title: that.$t(`请输入姓名`)
				// 		});
				// 	}
				// 	if (that.storeList.length == 0) return that.$util.Tips({
				// 		title: that.$t(`暂无门店,请选择其他方式`)
				// 	});
				// }
				// for (var i = 0; i < that.confirm.length; i++) {
				// 	let data = that.confirm[i]
				// 	if (data.status) {
				// 		if (data.label === 'text' || data.label === 'data' || data.label === 'time' || data.label ===
				// 			'id') {
				// 			if (!data.value.trim()) {
				// 				return uni.showToast({
				// 					title: that.$t(`请输入`) + `${data.title}`,
				// 					icon: 'none'
				// 				});
				// 			}
				// 		}
				// 		if (data.label === 'number') {
				// 			if (data.value <= 0) {
				// 				return uni.showToast({
				// 					title: that.$t(`请输入`) + `${data.title}`,
				// 					icon: 'none'
				// 				});
				// 			}
				// 		}
				// 		if (data.label === 'email') {
				// 			if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
				// 				return uni.showToast({
				// 					title: that.$t(`请输入正确的`) + `${data.title}`,
				// 					icon: 'none'
				// 				});
				// 			}
				// 		}
				// 		if (data.label === 'phone') {
				// 			if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
				// 				return uni.showToast({
				// 					title: that.$t(`请输入正确的`) + `${data.title}`,
				// 					icon: 'none'
				// 				});
				// 			}
				// 		}
				// 		if (data.label === 'img') {
				// 			if (!data.value.length) {
				// 				return uni.showToast({
				// 					title: that.$t(`请上传`) + `${data.title}`,
				// 					icon: 'none'
				// 				});
				// 			}
				// 		}
				// 	}
				// }
				data = {
					trade_in_express: that.trade_in_express, //寄件单号
					get_type: that.get_type, //收货方式（express快递;delivery送货;自提take;）
					is_deposit: that.payTypeIndex, //0:全款支付 1：定金支付
					pre_pay_type: that.pre_pay_type, //1：微信支付，2：余额支付
					send_date: that.get_type == 'delivery' ? that.tabListDate[that.tabCurrentDate].date :
					'', //上门日期（get_type=delivery时必须传）
					send_time: that.checkTime, //上门时间（get_type=delivery时必须传）
					need_insure: that.swichValue ? 1 : 0, //1：需要保险（get_type=express时可以传）
					is_cert: that.swichValue3 ? 1 : 0, //1：需要证书
					showGoldPrice: JSON.stringify(that.popInfo.showGoldPrice), //JSON字符串，接口/api/order/create_order_price的返回值
					system_store_id: that.get_type == 'take' ? that.system_store.id : '', //自提点id（get_type=take时必须传）
					custom_form: that.confirm,
					real_name: that.contacts,
					phone: that.contactsTel,
					addressId: that.addressId,
					formId: '',
					couponId: that.couponId,
					useIntegral: that.useIntegral,
					bargainId: that.BargainId,
					combinationId: that.combinationId,
					discountId: that.discountId,
					pinkId: that.pinkId,
					advanceId: that.advanceId,
					seckill_id: that.seckillId,
					mark: that.mark,
					store_id: that.system_store ? that.system_store.id : 0,
					is_trade_in: that.isAllChange() ? 1 : 0,
					'from': that.from,
					// shipping_type: that.$util.$h.Add(that.shippingType, 1),
					shipping_type: that.shipping_type, //crmeb自带的类型
					get_type: that.get_type, //新加的类型字段
					'new': that.news,
					'invoice_id': that.invChecked,
					// #ifdef H5
					quitUrl: location.protocol + '//' + location.hostname +
						'/pages/goods/order_pay_status/index?' +
						'&type=3' + '&totalPrice=' + this.totalPrice
					// #endif
					// #ifdef APP-PLUS
					quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
					// #endif
				};
				if (data.payType == 'yue' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
					return that.$util.Tips({
						title: that.$t(`余额不足`)
					});
				// uni.showLoading({
				// 	title: that.$t(`订单支付中`)
				// });
				// #ifdef MP
				that.paymentHandle(data);
				// 先把订阅屏蔽
				// openPaySubscribe().then(() => {
				// 	that.paymentHandle(data);
				// });
				// #endif
				// #ifndef MP
				that.paymentHandle(data);
				// #endif
			},
			bindDateChange: function(e, index) {
				this.confirm[index].value = e.target.value
			},
			bindTimeChange: function(e, index) {
				this.confirm[index].value = e.target.value
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();

				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			uploadpic: function(index, item) {
				let that = this;
				this.canvasStatus = true
				that.$util.uploadImageChange('upload/image', function(res) {
					item.value.push(res.data.url);
				}, (res) => {
					this.canvasStatus = false
				}, (res) => {
					this.canvasWidth = res.w
					this.canvasHeight = res.h
				});
			},
			DelPic: function(index, indexs) {
				let that = this,
					pic = this.confirm[index].value;
				that.confirm[index].value.splice(indexs, 1);
				// that.$set(that, 'pics', that.pics);
			},
			inputTripClick() {
				this.inputTrip = true
				// this.$refs.trip.foucs()
			},
			showMaoLocation(e) {
				let self = this;
				// #ifdef H5
				if (self.$wechat.isWeixin()) {
					self.$wechat.seeLocation({
						latitude: Number(e.latitude),
						longitude: Number(e.longitude),
						name: e.name,
						scale: 13,
						address: `${e.address}-${e.detailed_address}`,
					}).then(res => {})
				} else {
					// #endif	
					uni.openLocation({
						latitude: Number(e.latitude),
						longitude: Number(e.longitude),
						name: e.name,
						address: `${e.address}-${e.detailed_address}`,
						success: function() {
							Number
						}
					});
					// #ifdef H5	
				}
				// #endif
			},
			call(phone) {
				uni.makePhoneCall({
					phoneNumber: phone,
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.switch_box2{
		margin-left: 20rpx;
	}
	.fs_13 {
		font-size: 26rpx;
	}
	.by-materials-btn {
		width: 120rpx;
		height: 50rpx;
		border-radius: 25rpx;
		color: #383838;
		text-align: center;
		font-size: 28rpx;
		line-height: 50rpx;
		margin: 0 30rpx 0 12rpx;
		background: linear-gradient(134.64deg, rgba(247, 234, 198, 1) 0%, rgba(226, 192, 148, 1) 100%);
	}
	.book_box{
		margin-top: 14rpx;
		width: 163rpx;
		height: 112rpx;
		overflow: hidden;
		background: #CCCCCC;
		image{
			width: 100%;
			height: 100%;
		}
	}
	::v-deepuni-checkbox[disabled] .uni-checkbox-input {
		background-color: #eee;
	}

	.masker_tip {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.8);
		z-index: 100;

		.img_box {
			position: absolute;
			top: 200rpx;
			width: 750rpx;
			height: 380rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.toast_box {
		width: 750upx;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10000;
		display: flex;
		align-items: center;
		justify-content: center;

		.box {
			width: 375upx;
			overflow-y: auto;
			background-color: rgba(0, 0, 0, .6);
			border-radius: 10upx;
			padding: 20upx 40upx;
			box-sizing: border-box;
			/* #ifndef APP-PLUS-NVUE || APP-NVUE */
			max-height: 80vh;
			text-align: center;

			.text {
				line-height: 40upx;
				font-size: 28upx;
				color: #FFF;
			}

			/* #endif */
			/* #ifdef APP-PLUS-NVUE || APP-NVUE */
			position: fixed;
			top: 50%;
			left: 187.5upx;
			// transform: translate(-50%, -50%);
			/* #endif */
		}
	}

	.swich_box {
		.switch_open {
			background: #C3A769 !important;
		}

		.icon_open {

			left: 37rpx !important;
		}

		.on_off {
			position: relative;
			// display: flex;
			// align-items: center;
			width: 74rpx;
			height: 38rpx;
			// padding: 4rpx;
			border-radius: 19.5rpx;
			background: #000000;
			transition: all .3s;
			// border: 1rpx solid #383838;

			.open_icon {
				position: absolute;
				left: 6rpx;
				top: 50%;
				transform: translateY(-50%);
				width: 30rpx;
				height: 30rpx;
				transition: all .3s;
				border-radius: 50%;
				background: #FFF;
			}
		}
	}

	.change_pop {
		position: relative;
		width: 750rpx;
		// min-height: 1042rpx;
		opacity: 1;
		border-radius: 30rpx 30rpx 0px 0px;
		background: #F5F6F7;
		padding: 36rpx 0 50rpx;

		.pop_title {
			color: #2E2E2E;
			font-size: 34rpx;
			font-weight: 700;
			text-align: center;
			margin-bottom: 18rpx;
		}

		.good_list {

			background: #fff;
		}

		.pop_sub_title {
			color: #303030;
			font-size: 28rpx;
			text-align: center;
			margin-bottom: 18rpx;
		}
	}

	.labor_box {
		position: relative;
		width: 750rpx;
		// min-height: 1042rpx;
		opacity: 1;
		border-radius: 30rpx 30rpx 0px 0px;
		background: #FFFFFF;
		padding: 20rpx 0 50rpx;
		color: #000;

		.labor_price {
			padding: 28rpx 32rpx 40rpx 53rpx;
		}

		.ready_box {
			font-size: 28rpx;
			padding: 24rpx 32rpx 32rpx 53rpx;
			line-height: 40rpx;

			.ready_title {
				font-weight: 550;
			}
		}

		.item_box {
			font-size: 30rpx;
			padding: 20rpx 32rpx 24rpx 53rpx;

			.info_box {
				font-size: 28rpx;

			}

			.title {
				margin-bottom: 24rpx;
				font-weight: 550rpx;
			}

			.sub_title {
				margin-bottom: 20rpx;
				font-size: 28rpx;
			}
		}

		.line {
			width: 645rpx;
			border: 1px dashed #F6F6F6;
			margin: 0 auto;
		}
	}

	.sub_title {
		margin-bottom: 32rpx;
		font-size: 26rpx;
	}

	.redCalss {
		color: #D43030;
	}

	.agree_box {
		margin-top: 27rpx;
		padding: 0 60rpx;
		font-size: 28rpx;
		color: #A3A3A3;

		.icon_box {

			// width: 32rpx;
			// height: 32rpx;
			checkbox {
				transform: scale(0.9)
			}
		}
	}

	.info_footer {
		padding-top: 30rpx;

		.left_label {
			font-size: 30rpx;
			color: #000;
		}

		.right_price {
			.list_detail {
				font-size: 26rpx;
				color: #737272;

				.iconfont {
					font-size: 20rpx;
				}
			}
		}

	}

	.change_info {
		border-bottom: 2rpx solid #F6F6F6;
		border-top: 2rpx solid #F6F6F6;
		padding: 30rpx 0;
		display: grid;
		grid-row-gap: 32rpx;

		.info_item {
			.text_info {
				font-size: 30rpx;
				color: #000000;
			}
		}
	}

	.time_box {
		background: #fff;
		padding-bottom: 40rpx;

		.title {
			color: #3B3A39;
			font-size: 34rpx;
			font-weight: 700;
			height: 110rpx;
			padding-left: 40rpx;
			border-bottom: 2rpx solid #E5E5E5;
		}

		.btn {
			width: 720rpx;
			height: 89rpx;
			margin: 30rpx auto 0;
			line-height: 89rpx;
			text-align: center;
			color: #fff;
			font-size: 30rpx;
			font-weight: 700;
			border-radius: 10rpx;
			background: var(--view-theme);
		}

		.body {
			overflow: hidden;
			height: 500rpx;
			padding-top: 40rpx;
			text-align: center;
			font-size: 30rpx;
			font-weight: 500;

			.time_list {
				height: 100%;
				padding: 0 86rpx 0 36rpx;

				text {
					color: #A8A8A8;
				}

				.time_item {
					color: #A8A8A8;
					width: 407rpx;
					height: 101rpx;
					line-height: 109rpx;
					border: 1px solid #C0C0C0;
					border-radius: 12rpx;

					&:not(:last-child) {
						margin-bottom: 20rpx;
					}
				}

				.active {
					color: #3D3D3D;
					border: 1px solid #000000;
				}
			}

			.date_box {
				height: 100%;

				.tab_item {
					color: #3D3D3D;
					width: 221rpx;
					height: 109rpx;
					line-height: 109rpx;
				}

				.active {
					background: #F1F1F1;
				}
			}
		}

	}

	.close_icon {
		position: absolute;
		top: 30rpx;
		right: 30rpx;
		width: 55rpx;
		height: 55rpx;
		border-radius: 50%;
		overflow: hidden;
		background: #CCCCCC;

		.iconfont {
			font-size: 35rpx;
			color: #474747;
		}
	}

	.konw_btn {
		// width: 690rpx;
		height: 94rpx;
		line-height: 94rpx;
		margin: 0 auto;
		border-radius: 47rpx;
		color: #fff;
		font-size: 34rpx;
		text-align: center;
		background: var(--view-theme);
	}

	.detailed_box {
		font-size: 30rpx;
		position: relative;
		padding: 68rpx 50rpx 40rpx;
		border-radius: 42rpx 42rpx 0 0;
		background: #FFFFFF;



		.title {
			padding-left: 20rpx;
			color: #737272;
			font-size: 34rpx;
			padding-bottom: 28rpx;

		}



		.price_box {
			text-align: right;
			margin: 23rpx 0 50rpx;
			color: #000;
			font-size: 28rpx;

			.num {
				font-size: 34rpx;
				font-weight: 700;
				color: #F54105;
			}
		}

		.detail_info {
			border-top: 1px solid #F6F6F6;
			border-bottom: 1px solid #F6F6F6;
			padding: 20rpx 10rpx;

			.info_item {
				display: flex;
				justify-content: space-between;
				line-height: 50rpx;

				.left {}

				.right {
					color: #000;
					// color: #D43030;
				}
			}
		}
	}

	.pop_box {
		position: relative;
		padding: 94rpx 52rpx 40rpx;
		color: #383838;
		width: 613rpx;
		// height: 799rpx;
		border-radius: 42rpx;
		background: #FFFFFF;

		.icon_box {
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			top: -94rpx;
			width: 187rpx;
			height: 187rpx;
			border-radius: 50%;
			padding: 13rpx;
			background: #fff;

			.img_box {
				width: 162rpx;
				height: 162rpx;
				background: #F4F6F9;
				border-radius: 50%;

				image {
					width: 108rpx;
					height: 108rpx;
				}
			}
		}

		.pop_footer {
			text-align: center;

			.pop_btn {
				.btn {
					font-size: 32rpx;
					width: 228rpx;
					height: 75rpx;
					border-radius: 8rpx;
					line-height: 75rpx;
					text-align: center;
				}

				.gray_btn {
					background: #F4F6F9;
				}

				.theme_btn {
					color: #fff;
					background: var(--view-theme);
				}
			}

			.pop_tip {
				margin-top: 20rpx;
				font-size: 28rpx;
				color: #808080;
			}


		}

		.title {
			margin-bottom: 40rpx;
			font-size: 32rpx;
			font-weight: 500;
		}

		.good_info {
			margin-bottom: 70rpx;

			.info_item {
				margin-bottom: 26rpx;

				.left {
					font-size: 32rpx;
				}

				.right {
					font-size: 40rpx;
					color: #E63523;
				}
			}
		}
	}

	.insure_text {
		font-size: 26rpx;
		color: #737272;
		margin-top: 15rpx;
	}

	.tip_box {
		color: #FF1717;
		font-size: 26rpx;
		padding: 25rpx 40rpx;
	}

	.pay_type {
		.active {
			color: #000 !important;

		}

		.type_item {
			color: rgba(0, 0, 0, 0.3);
			margin-left: 34rpx;

			.check_active {
				background: #000 !important;
			}

			.check_box {
				width: 33rpx;
				height: 33rpx;
				border-radius: 50%;
				overflow: hidden;
				border: 1px solid #000000;
				background: #fff;
				margin-right: 17rpx;

				.in_circle {
					width: 19rpx;
					height: 19rpx;
					border-radius: 50%;
					overflow: hidden;
					background: #fff;
				}
			}


		}
	}

	.alipaysubmit {
		display: none;
	}

	.tab_box {
		width: 710rpx;
		margin: 0 auto;
		height: 85rpx;
		background: #F5F6F7;
		border-radius: 8rpx 8rpx 0 0;
		overflow: hidden;

		.tab_item {
			height: 100%;
			width: 33.33%;
			font-size: 28rpx;
			color: #2E2E2E;
		}

		.tab_item.active {
			position: relative;
			width: 180rpx;
		}

		.tab_item:nth-child(1).active::after {
			position: absolute;
			right: -85rpx;
			top: 0;
			content: '';
			border: 44rpx solid #F3E6BA;
			border-top: 44rpx solid transparent;
			border-right: 44rpx solid transparent;
		}

		.tab_item:nth-child(2).active::after {
			position: absolute;
			right: -85rpx;
			top: 0;
			content: '';
			border: 44rpx solid #F3E6BA;
			border-bottom: 44rpx solid transparent;
			border-right: 44rpx solid transparent;
		}

		.tab_item:nth-child(2).active::before {
			position: absolute;
			left: -85rpx;
			top: 0;
			content: '';
			border: 44rpx solid #F3E6BA;
			border-bottom: 44rpx solid transparent;
			border-left: 44rpx solid transparent;
		}

		.tab_item:nth-child(3).active::before {
			position: absolute;
			left: -85rpx;
			top: 0;
			content: '';
			border: 44rpx solid #F3E6BA;
			border-top: 44rpx solid transparent;
			border-left: 44rpx solid transparent;
		}

		.active {
			background: #F3E6BA;
		}

	}

	.order-submission {
		/* #ifdef APP-PLUS */
		padding-bottom: 70rpx;
		/* #endif */
		/* #ifdef MP */
		padding-bottom: 300rpx;
		/* #endif */

	}

	.order-submission .line {
		width: 100%;
		height: 3rpx;
	}

	.order-submission .line image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-submission .address {
		padding: 28rpx 30rpx;
		background-color: #fff;
		box-sizing: border-box;
		flex-wrap: nowrap;

		.icon {
			.iconfont {
				width: 44rpx;
				height: 44rpx;
				background: var(--view-minorColorT);
				font-size: 20rpx;
				border-radius: 50%;
				text-align: center;
				line-height: 44rpx;
				color: var(--view-theme);
				margin-left: 26rpx;
			}
		}
	}

	.order-submission .address .addressCon {
		max-width: 500rpx;
		font-size: 26rpx;
		color: #666;
	}

	.order-submission .address .addressCon .name {
		font-size: 30rpx;
		color: #282828;
		font-weight: bold;
		margin-bottom: 10rpx;
	}

	.self_take {
		.left_img {
			width: 107rpx;
			height: 107rpx;
			margin-right: 24rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.right_info {
			max-width: 500rpx;

			.address_icon {
				margin-left: 20rpx;

				.iconfont {
					font-size: 25rpx;
					margin-right: 10rpx;
				}

				text {
					font-size: 26rpx;
					color: #808080;
				}
			}
		}
	}

	.address_box {
		width: 100%;
	}

	.right_icon {
		color: #EB0618;
		font-size: 26rpx;

		.iconfont {
			margin-left: 20rpx;
			font-size: 20rpx !important;
			color: #000 !important;
		}
	}

	.order-submission .address .addressCon .name .phone {
		margin-left: 50rpx;
	}

	.order-submission .address .addressCon .default {
		margin-right: 12rpx;
	}

	.order-submission .address .addressCon .setaddress {
		color: #333;
		font-size: 28rpx;
	}

	.order-submission .address .iconfont {
		font-size: 35rpx;
		color: #707070;
	}

	.order-submission .allAddress {
		width: 100%;
		// background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
		padding-top: 17rpx;
		margin-bottom: 12rpx;

		.add-title {
			height: 72rpx;
			margin: 0 26rpx;
			border-bottom: 1px solid #eee;
			background-color: #fff;
			width: 710rpx;
			margin: 0 auto;
			padding: 0 26rpx;
			// border-radius: 12rpx 12rpx 0 0;

			.icon {
				height: 32rpx;
				background: #1890FF;
				border-radius: 4rpx;
				font-size: 20rpx;
				font-weight: 400;
				color: #FFFFFF;
				text-align: center;
				line-height: 32rpx;
				padding: 0 6rpx;

				&.orange {
					background: #FE960F;
				}

				&.red {
					background: #E93323;
				}
			}

			.add-text {
				margin-left: 14rpx;
				width: 360rpx;
			}

			.text {
				font-size: 26rpx;
				font-weight: 400;
				color: #999999;

				.icon-jiantou {
					display: inline-block;
					font-size: 20rpx;
				}
			}
		}
	}

	.order-submission .allAddress .nav {
		width: 710rpx;
		margin: 0 auto;
	}

	.order-submission .allAddress .nav .item {
		width: 355rpx;
	}

	.order-submission .allAddress .nav .item.on {
		position: relative;
		width: 250rpx;
	}

	.order-submission .allAddress .nav .item.on::before {
		position: absolute;
		bottom: 0;
		content: "快递";
		font-size: 28rpx;
		display: block;
		height: 0;
		width: 336rpx;
		border-width: 0 20rpx 80rpx 0;
		border-style: none solid solid;
		border-color: transparent transparent #fff;
		z-index: 2;
		border-radius: 7rpx 30rpx 0 0;
		text-align: center;
		line-height: 80rpx;
	}

	.order-submission .allAddress .nav .item:nth-of-type(2).on::before {
		content: "自提";
		border-width: 0 0 80rpx 20rpx;
		border-radius: 30rpx 7rpx 0 0;
	}

	.order-submission .allAddress .nav .item.on2 {
		position: relative;
	}

	.order-submission .allAddress .nav .item.on2::before {
		position: absolute;
		bottom: 0;
		content: "自提";
		font-size: 28rpx;
		display: block;
		height: 0;
		width: 400rpx;
		border-width: 0 0 60rpx 60rpx;
		border-style: none solid solid;
		border-color: transparent transparent rgba(255, 255, 255, 0.6);
		border-radius: 40rpx 6rpx 0 0;
		text-align: center;
		line-height: 60rpx;
	}

	.order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
		content: "快递";
		border-width: 0 60rpx 60rpx 0;
		border-radius: 6rpx 40rpx 0 0;
	}

	.order-submission .allAddress .address {
		width: 710rpx;
		height: 150rpx;
		margin: 0 auto;
	}

	.order-submission .allAddress .line {
		width: 710rpx;
		margin: 0 auto;
	}

	.order-submission .wrapper .item .discount .placeholder {
		color: #ccc;
	}

	.placeholder-textarea {
		position: relative;

		.placeholder {
			position: absolute;
			color: #ccc;
			top: 26rpx;
			left: 30rpx;
		}
	}

	.change_box {
		padding: 22rpx 30rpx;
		background-color: #fff;
		font-size: 30rpx;
		margin-top: 16rpx;
		border: 3rpx solid #D43030;

		.chang_gif {
			width: 112rpx;
			height: 112rpx;
			margin-right: 20rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.change_top {
			font-size: 32rpx;
			color: #000000;

			.left {
				.warning_icon {
					width: 32rpx;
					height: 32rpx;
					line-height: 0;
					margin-left: 5rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}
			}
		}

		.change_btm {
			font-size: 28rpx;
			margin-top: 8rpx;
			color: #737272;
		}
	}

	.order-submission .wrapper {
		background-color: #fff;
		margin-top: 13rpx;
	}

	.order-submission .wrapper .item {
		padding: 27rpx 30rpx;
		font-size: 30rpx;
		color: #282828;
		border-bottom: 1px solid #f0f0f0;

		.mark {
			background-color: #f9f9f9;
			// width: 345px;
			min-height: 70px;
			border-radius: 1px;
			margin-top: 15px;
			padding: 12px 14px;
			color: #ccc;
			font-size: 28rpx;
			box-sizing: border-box;
		}

		.mark-msg {
			color: #333;
			font-size: 28rpx;
		}
	}

	.order-submission .wrapper .item .discount {
		font-size: 30rpx;
		color: #999;
	}

	.order-submission .wrapper .item .discount input {
		text-align: end;
	}

	.order-submission .wrapper .item .discount .iconfont {
		color: #515151;
		font-size: 30rpx;
		margin-left: 15rpx;
	}

	.order-submission .wrapper .item .discount .num {
		font-size: 32rpx;
		margin-right: 20rpx;
	}

	.order-submission .wrapper .item .shipping {
		font-size: 30rpx;
		color: #999;
		position: relative;
		padding-right: 58rpx;
	}

	.order-submission .wrapper .item .shipping .iconfont {
		font-size: 35rpx;
		color: #707070;
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		margin-left: 30rpx;
	}

	.order-submission .wrapper .item textarea {
		background-color: #f9f9f9;
		width: 100%;
		height: 135rpx;
		border-radius: 3rpx;
		margin-top: 30rpx;
		padding: 25rpx 28rpx;
		font-size: 28rpx;
		box-sizing: border-box;
	}

	.order-submission .wrapper .item .placeholder {
		color: #ccc;
		font-size: 28rpx;
	}

	.order-submission .wrapper .item .list {
		margin-top: 35rpx;
	}

	.order-submission .wrapper .item .list .payItem {
		border: 1px solid #eee;
		border-radius: 6rpx;
		height: 86rpx;
		width: 100%;
		box-sizing: border-box;
		margin-top: 20rpx;
		font-size: 28rpx;
		color: #282828;
	}

	.order-submission .wrapper .item .list .payItem.on {
		border-color: #fc5445;
		color: #e93323;
	}

	.order-submission .wrapper .item .list .payItem .name {
		width: 50%;
		text-align: center;
		border-right: 1px solid #eee;
		padding-left: 80rpx;
	}

	.order-submission .wrapper .item .list .payItem .name .iconfont {
		width: 44rpx;
		height: 44rpx;
		border-radius: 50%;
		text-align: center;
		line-height: 44rpx;
		background-color: #fe960f;
		color: #fff;
		font-size: 30rpx;
		margin-right: 15rpx;
	}

	.order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
		background-color: #41b035;
	}

	.order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
		background-color: #1677FF;
	}

	.order-submission .wrapper .item .list .payItem .tip {
		width: 49%;
		text-align: center;
		font-size: 26rpx;
		color: #aaa;
	}

	.order-submission .moneyList {
		margin-top: 12rpx;
		background-color: #fff;
		padding: 30rpx;
	}

	.order-submission .moneyList .item {
		font-size: 30rpx;
		color: #000;
	}

	.order-submission .moneyList .item~.item {
		margin-top: 20rpx;
	}

	.order-submission .moneyList .item .money {
		color: #000;

		input {
			text-align: right;
		}

		.iconfont {
			color: #C3A769;
			margin-left: 40rpx;
		}
	}

	.footer {
		text-align: center;
		width: 100%;
		background-color: #fff;
		font-size: 28rpx;
		color: #333;
		box-sizing: border-box;
		position: fixed;
		left: 0;
		bottom: 0;
		// padding: 15rpx 30rpx;
		padding-bottom: calc(15rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(15rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		z-index: 9;
		&.productWindow {
			margin-bottom: -220rpx;
			position: relative;
		}

		.btn_box {
			border-top: 1rpx solid #F5F6F7;
			padding-top: 22rpx;
			width: 718rpx;
			margin: 0 auto;

			.btn {
				width: 600rpx;
				padding: 15rpx 0;
				height: 130rpx;

				.text1 {
					font-size: 34rpx;
					margin-bottom: 5rpx
				}

				.text2 {
					font-size: 22rpx;
				}
			}

			.left_btn {
				// border-radius: 0px 100rpx 100rpx 0rpx;
				border-radius:100rpx;
				
				background: #F3EEE1;
				color: #8C7137;
			}

			.right_btn {
				border-radius: 100rpx 0px 0px 100rpx;
				color: #fff;
				background: #C3A769;
			}
		}

		.top_box {
			padding: 30rpx 0;
			border-bottom: 1rpx solid #F5F6F7;
			font-size: 30rpx;

			.thin_detail {
				margin-left: 10rpx;
				font-size: 26rpx;
				color: #737272;

				.iconfont {
					font-size: 20rpx;
				}
			}
		}

	}

	.footer .settlement {
		font-size: 30rpx;
		color: #fff;
		width: 240rpx;
		height: 70rpx;
		background-color: var(--view-theme);
		border-radius: 50rpx;
		text-align: center;
		line-height: 70rpx;
	}

	.footer .transparent {
		opacity: 0
	}

	.confirm {
		text-align: right;
		font-size: 22rpx;
	}

	.confirmImg {
		width: 100%;

		.img {
			width: 136rpx;
			height: 136rpx;
		}

		.pictrue {
			width: 136rpx;
			height: 136rpx;
			box-sizing: border-box;
			margin: 18rpx;
			margin-bottom: 35rpx;
			position: relative;
			font-size: 22rpx;
			color: #bbb;

			.del {
				position: absolute;
				top: 0;
				right: 0;
			}
		}

		.bor {
			border: 1rpx solid #ddd;
		}

	}

	.fontC {
		color: grey;
	}
</style>